summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranselm@anselm1 <unknown>2008-03-04 21:40:49 +0000
committeranselm@anselm1 <unknown>2008-03-04 21:40:49 +0000
commit39af3c2607de029b66498064c4fc374df34fc653 (patch)
tree8a5845b6d59dc4477ff2773c8d996ae5536a818c
parentmonocle goes mainstream (diff)
downloaddwm-39af3c2607de029b66498064c4fc374df34fc653.tar.gz
dwm-39af3c2607de029b66498064c4fc374df34fc653.zip
renamed monocle into maxmise, documented the keybindings in dwm(1)
-rw-r--r--config.def.h12
-rw-r--r--dwm.131
-rw-r--r--dwm.c11
3 files changed, 31 insertions, 23 deletions
diff --git a/config.def.h b/config.def.h
index 11993da..72ada0e 100644
--- a/config.def.h
+++ b/config.def.h
@@ -11,8 +11,8 @@
11#define SELBGCOLOR "#0066ff" 11#define SELBGCOLOR "#0066ff"
12#define SELFGCOLOR "#ffffff" 12#define SELFGCOLOR "#ffffff"
13 13
14/* old */ 14/* tagging */
15const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 15const char tags[][MAXLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
16 16
17Rule rules[] = { 17Rule rules[] = {
18 /* class:instance:title substr tags ref isfloating */ 18 /* class:instance:title substr tags ref isfloating */
@@ -26,11 +26,12 @@ Rule rules[] = {
26#define MWFACT 0.6 /* master width factor [0.1 .. 0.9] */ 26#define MWFACT 0.6 /* master width factor [0.1 .. 0.9] */
27#define RESIZEHINTS True /* False - respect size hints in tiled resizals */ 27#define RESIZEHINTS True /* False - respect size hints in tiled resizals */
28#define SNAP 32 /* snap pixel */ 28#define SNAP 32 /* snap pixel */
29
29Layout layouts[] = { 30Layout layouts[] = {
30 /* symbol function */ 31 /* symbol function */
31 { "[]=", tile }, /* first entry is default */ 32 { "[]=", tile }, /* first entry is default */
32 { "><>", floating }, 33 { "><>", floating },
33 { "[M]", monocle }, 34 { "[M]", maximise },
34}; 35};
35 36
36/* key definitions */ 37/* key definitions */
@@ -40,14 +41,15 @@ Key keys[] = {
40 { MODKEY, XK_p, spawn, 41 { MODKEY, XK_p, spawn,
41 "exec dmenu_run -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"' -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"'" }, 42 "exec dmenu_run -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"' -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"'" },
42 { MODKEY|ShiftMask, XK_Return, spawn, "exec uxterm" }, 43 { MODKEY|ShiftMask, XK_Return, spawn, "exec uxterm" },
43 { MODKEY, XK_space, setlayout, NULL },
44 { MODKEY, XK_b, togglebar, NULL }, 44 { MODKEY, XK_b, togglebar, NULL },
45 { MODKEY, XK_t, setlayout, "[]=" },
46 { MODKEY, XK_f, setlayout, "><>" },
47 { MODKEY, XK_m , setlayout, "[M]" },
45 { MODKEY, XK_j, focusnext, NULL }, 48 { MODKEY, XK_j, focusnext, NULL },
46 { MODKEY, XK_k, focusprev, NULL }, 49 { MODKEY, XK_k, focusprev, NULL },
47 { MODKEY, XK_h, setmwfact, "-0.05" }, 50 { MODKEY, XK_h, setmwfact, "-0.05" },
48 { MODKEY, XK_l, setmwfact, "+0.05" }, 51 { MODKEY, XK_l, setmwfact, "+0.05" },
49 { MODKEY, XK_r, reapply, NULL }, 52 { MODKEY, XK_r, reapply, NULL },
50 { MODKEY, XK_m, setlayout, "[M]" },
51 { MODKEY, XK_Return, zoom, NULL }, 53 { MODKEY, XK_Return, zoom, NULL },
52 { MODKEY, XK_Tab, viewprevtag, NULL }, 54 { MODKEY, XK_Tab, viewprevtag, NULL },
53 { MODKEY|ShiftMask, XK_space, togglefloating, NULL }, 55 { MODKEY|ShiftMask, XK_space, togglefloating, NULL },
diff --git a/dwm.1 b/dwm.1
index 934c124..4737ba2 100644
--- a/dwm.1
+++ b/dwm.1
@@ -5,22 +5,23 @@ dwm \- dynamic window manager
5.B dwm 5.B dwm
6.RB [ \-v ] 6.RB [ \-v ]
7.SH DESCRIPTION 7.SH DESCRIPTION
8dwm is a dynamic window manager for X. It manages windows in tiled and 8dwm is a dynamic window manager for X. It manages windows in tiled, maximised
9floating layouts. Either layout can be applied dynamically, optimizing the 9and floating layouts. Either layout can be applied dynamically, optimising the
10environment for the application in use and the task performed. 10environment for the application in use and the task performed.
11.P 11.P
12In tiled layout windows are managed in a master and stacking area. The master 12In tiled layout windows are managed in a master and stacking area. The master
13area contains the window which currently needs most attention, whereas the 13area contains the window which currently needs most attention, whereas the
14stacking area contains all other windows. In floating layout windows can be 14stacking area contains all other windows. In maximised layout all windows are
15resized and moved freely. Dialog windows are always managed floating, 15maximised to the screen size. In floating layout windows can be resized and
16regardless of the layout applied. 16moved freely. Dialog windows are always managed floating, regardless of the
17layout applied.
17.P 18.P
18Windows are grouped by tags. Each window can be tagged with one or multiple 19Windows are grouped by tags. Each window can be tagged with one or multiple
19tags. Selecting certain tags displays all windows with these tags. 20tags. Selecting certain tags displays all windows with these tags.
20.P 21.P
21dwm contains a small status bar which displays all available tags, the layout, 22dwm contains a small status bar which displays all available tags, the layout,
22the title of the focused window, and the text read from standard input. A 23the title of the focused window, and the text read from standard input. A
23floating window is indicated with an empty square and a maximized 24floating window is indicated with an empty square and a maximised
24floating window is indicated with a filled square before the windows 25floating window is indicated with a filled square before the windows
25title. The selected tags are indicated with a different color. The tags of 26title. The selected tags are indicated with a different color. The tags of
26the focused window are indicated with a filled square in the top left 27the focused window are indicated with a filled square in the top left
@@ -62,6 +63,18 @@ Zooms/cycles current window to/from master area (tiled layout only).
62.B Mod1\-Tab 63.B Mod1\-Tab
63Toggles to the previously selected tags. 64Toggles to the previously selected tags.
64.TP 65.TP
66.B Mod1\-t
67Applies tiled layout.
68.TP
69.B Mod1\-f
70Applies loating layout.
71.TP
72.B Mod1\-m
73Applies maximised layout.
74.TP
75.B Mod1\-space
76Toggles between layouts.
77.TP
65.B Mod1\-b 78.B Mod1\-b
66Shows/hides the status bar. 79Shows/hides the status bar.
67.TP 80.TP
@@ -77,9 +90,6 @@ Focus previous window.
77.B Mod1\-l 90.B Mod1\-l
78Increases the master area width about 5% (tiled layout only). 91Increases the master area width about 5% (tiled layout only).
79.TP 92.TP
80.B Mod1\-m
81Maximizes current window (floating layout/window only).
82.TP
83.B Mod1\-r 93.B Mod1\-r
84Re-applies tagging rules to all windows. 94Re-applies tagging rules to all windows.
85.TP 95.TP
@@ -99,9 +109,6 @@ tag to/from current window.
99.B Mod1\-Shift\-c 109.B Mod1\-Shift\-c
100Close focused window. 110Close focused window.
101.TP 111.TP
102.B Mod1\-space
103Toggle between tiled and floating layout (affects all windows).
104.TP
105.B Mod1\-Shift\-space 112.B Mod1\-Shift\-space
106Toggle focused window between tiled and floating state. 113Toggle focused window between tiled and floating state.
107.TP 114.TP
diff --git a/dwm.c b/dwm.c
index b417167..b8db678 100644
--- a/dwm.c
+++ b/dwm.c
@@ -48,7 +48,7 @@
48#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask) 48#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)
49#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask)) 49#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask))
50#define LENGTH(x) (sizeof x / sizeof x[0]) 50#define LENGTH(x) (sizeof x / sizeof x[0])
51#define MAXTAGLEN 16 51#define MAXLEN 16
52#define MOUSEMASK (BUTTONMASK|PointerMotionMask) 52#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
53 53
54 54
@@ -153,7 +153,7 @@ void killclient(const char *arg);
153void manage(Window w, XWindowAttributes *wa); 153void manage(Window w, XWindowAttributes *wa);
154void mappingnotify(XEvent *e); 154void mappingnotify(XEvent *e);
155void maprequest(XEvent *e); 155void maprequest(XEvent *e);
156void monocle(void); 156void maximise(void);
157void movemouse(Client *c); 157void movemouse(Client *c);
158Client *nexttiled(Client *c); 158Client *nexttiled(Client *c);
159void propertynotify(XEvent *e); 159void propertynotify(XEvent *e);
@@ -1073,13 +1073,12 @@ maprequest(XEvent *e) {
1073} 1073}
1074 1074
1075void 1075void
1076monocle(void) { 1076maximise(void) {
1077 Client *c; 1077 Client *c;
1078 1078
1079 domwfact = dozoom = False; 1079 domwfact = dozoom = False;
1080 for(c = clients; c; c = c->next) 1080 for(c = nexttiled(clients); c; c = nexttiled(c->next))
1081 if(isvisible(c)) 1081 resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
1082 resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
1083} 1082}
1084 1083
1085void 1084void