Compare commits
3 Commits
acd431e3ef
...
6eb2ae7c8b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6eb2ae7c8b | ||
|
|
f26327a181 | ||
|
|
879e7d351d |
2
config.h
2
config.h
@@ -27,7 +27,7 @@ static const char col_dgreen[] = "#008000";
|
|||||||
static const char *colors[][3] = {
|
static const char *colors[][3] = {
|
||||||
/* Scheme fg bg border */
|
/* Scheme fg bg border */
|
||||||
[SchemeNorm] = { col_gray3, col_black, col_black },
|
[SchemeNorm] = { col_gray3, col_black, col_black },
|
||||||
[SchemeSel] = { col_white, col_black, "#000077" },
|
[SchemeSel] = { col_white, col_black, col_white },
|
||||||
[SchemeStatus] = { col_white, col_black, col_black },
|
[SchemeStatus] = { col_white, col_black, col_black },
|
||||||
[SchemeTagsSel] = { col_white, col_gray2, col_black },
|
[SchemeTagsSel] = { col_white, col_gray2, col_black },
|
||||||
[SchemeTagsNorm] = { col_white, col_black, col_black },
|
[SchemeTagsNorm] = { col_white, col_black, col_black },
|
||||||
|
|||||||
38
dwm.1
38
dwm.1
@@ -17,30 +17,16 @@ area on the left contains one window by default, and the stacking area
|
|||||||
on the right contains all other windows. The number of master area
|
on the right contains all other windows. The number of master area
|
||||||
windows can be adjusted from zero to an arbitrary number.
|
windows can be adjusted from zero to an arbitrary number.
|
||||||
.IP \[bu]
|
.IP \[bu]
|
||||||
monocle (normal, centred or floating)
|
monocle (normal or floating master)
|
||||||
|
|
||||||
Normal: all windows are maximised to the screen size.
|
Normal: all windows are maximised to the screen size.
|
||||||
|
|
||||||
Centred: the screen is split into three sections with the master
|
Floating master: the master clients are placed floating in the centre
|
||||||
clients getting the second section and the stacking clients get the
|
of the screen while the remaining stacking clients are placed side by
|
||||||
remaining 2 sections to be laid out in.
|
side vertically.
|
||||||
|
|
||||||
Floating: the master clients are placed floating in the centre of the
|
|
||||||
screen while the remaining stacking clients are placed side by side
|
|
||||||
vertically.
|
|
||||||
.IP \[bu]
|
|
||||||
fibonacci (dwindle and spiral): windows are tiled in a spiralling or
|
|
||||||
dwindling pattern.
|
|
||||||
|
|
||||||
In the dwindle layout new clients tend towards the bottom left of the
|
|
||||||
monitor while in the spiral layout clients tend towards the centre
|
|
||||||
bottom left.
|
|
||||||
.IP \[bu]
|
.IP \[bu]
|
||||||
deck: the stacking clients are placed floating on top of each other
|
deck: the stacking clients are placed floating on top of each other
|
||||||
such that there are only two partitions of the screen space.
|
such that there are only two partitions of the screen space.
|
||||||
.IP \[bu]
|
|
||||||
gapless grid: n clients are arranged into a square of ceil(sqrt(n))
|
|
||||||
length, where the top left is the latest client opened.
|
|
||||||
.P
|
.P
|
||||||
Dialog windows are always managed floating, regardless of the layout
|
Dialog windows are always managed floating, regardless of the layout
|
||||||
applied.
|
applied.
|
||||||
@@ -171,26 +157,10 @@ Set layout to floating.
|
|||||||
.B Mod\-Shift\-m
|
.B Mod\-Shift\-m
|
||||||
Set layout to monocle.
|
Set layout to monocle.
|
||||||
|
|
||||||
.TP
|
|
||||||
.B Mod\-Shift\-u
|
|
||||||
Set layout to centred monocle.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B Mod\-Shift\-o
|
.B Mod\-Shift\-o
|
||||||
Set layout to centred floating monocle.
|
Set layout to centred floating monocle.
|
||||||
|
|
||||||
.TP
|
|
||||||
.B Mod\-Shift\-s
|
|
||||||
Set layout to spiral fibonacci.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B Mod\-Shift\-D
|
|
||||||
Set layout to dwindle fibonacci.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B Mod\-Shift\-g
|
|
||||||
Set layout to gapless grid.
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B Mod\-Shift\-d
|
.B Mod\-Shift\-d
|
||||||
Set layout to deck layout.
|
Set layout to deck layout.
|
||||||
|
|||||||
11
dwm.c
11
dwm.c
@@ -571,6 +571,7 @@ clientmessage(XEvent *e)
|
|||||||
{
|
{
|
||||||
XClientMessageEvent *cme = &e->xclient;
|
XClientMessageEvent *cme = &e->xclient;
|
||||||
Client *c = wintoclient(cme->window);
|
Client *c = wintoclient(cme->window);
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
if (!c)
|
if (!c)
|
||||||
return;
|
return;
|
||||||
@@ -585,8 +586,14 @@ clientmessage(XEvent *e)
|
|||||||
setsticky(c, (cme->data.l[0] == 1 ||
|
setsticky(c, (cme->data.l[0] == 1 ||
|
||||||
(cme->data.l[0] == 2 && !c->issticky)));
|
(cme->data.l[0] == 2 && !c->issticky)));
|
||||||
} else if (cme->message_type == netatom[NetActiveWindow]) {
|
} else if (cme->message_type == netatom[NetActiveWindow]) {
|
||||||
if (c != selmon->sel && !c->isurgent)
|
for (i = 0; i < LENGTH(tags) && !((1 << i) & c->tags); i++);
|
||||||
seturgent(c, 1);
|
if (i < LENGTH(tags)) {
|
||||||
|
const Arg a = {.ui = 1 << i};
|
||||||
|
selmon = c->mon;
|
||||||
|
view(&a);
|
||||||
|
focus(c);
|
||||||
|
restack(selmon);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
57
patches/dwm-focusonnetactive-6.2.diff
Normal file
57
patches/dwm-focusonnetactive-6.2.diff
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
From 286ca3bb1af08b452bf8140abcc23d4ef61baaa2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: bakkeby <bakkeby@gmail.com>
|
||||||
|
Date: Tue, 7 Apr 2020 12:33:04 +0200
|
||||||
|
Subject: [PATCH] Activate a window in response to _NET_ACTIVE_WINDOW
|
||||||
|
|
||||||
|
By default, dwm response to client requests to _NET_ACTIVE_WINDOW client
|
||||||
|
messages by setting the urgency bit on the named window.
|
||||||
|
|
||||||
|
This patch activates the window instead.
|
||||||
|
|
||||||
|
Both behaviours are legitimate according to
|
||||||
|
https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472702304
|
||||||
|
|
||||||
|
One should decide which of these one should perform based on the message
|
||||||
|
senders' untestable claims that it represents the end-user. Setting the
|
||||||
|
urgency bit is the conservative decision. This patch implements the more
|
||||||
|
trusting alternative.
|
||||||
|
|
||||||
|
It also allows dwm to work with `wmctrl -a` and other external window
|
||||||
|
management utilities
|
||||||
|
|
||||||
|
---
|
||||||
|
dwm.c | 11 +++++++++--
|
||||||
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dwm.c b/dwm.c
|
||||||
|
index 4465af1..3919d47 100644
|
||||||
|
--- a/dwm.c
|
||||||
|
+++ b/dwm.c
|
||||||
|
@@ -514,6 +514,7 @@ clientmessage(XEvent *e)
|
||||||
|
{
|
||||||
|
XClientMessageEvent *cme = &e->xclient;
|
||||||
|
Client *c = wintoclient(cme->window);
|
||||||
|
+ unsigned int i;
|
||||||
|
|
||||||
|
if (!c)
|
||||||
|
return;
|
||||||
|
@@ -523,8 +524,14 @@ clientmessage(XEvent *e)
|
||||||
|
setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
|
||||||
|
|| (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen)));
|
||||||
|
} else if (cme->message_type == netatom[NetActiveWindow]) {
|
||||||
|
- if (c != selmon->sel && !c->isurgent)
|
||||||
|
- seturgent(c, 1);
|
||||||
|
+ for (i = 0; i < LENGTH(tags) && !((1 << i) & c->tags); i++);
|
||||||
|
+ if (i < LENGTH(tags)) {
|
||||||
|
+ const Arg a = {.ui = 1 << i};
|
||||||
|
+ selmon = c->mon;
|
||||||
|
+ view(&a);
|
||||||
|
+ focus(c);
|
||||||
|
+ restack(selmon);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
||||||
Reference in New Issue
Block a user