diff options
| author | anselm@anselm1 <unknown> | 2008-03-04 21:40:49 +0000 |
|---|---|---|
| committer | anselm@anselm1 <unknown> | 2008-03-04 21:40:49 +0000 |
| commit | 39af3c2607de029b66498064c4fc374df34fc653 (patch) | |
| tree | 8a5845b6d59dc4477ff2773c8d996ae5536a818c | |
| parent | monocle goes mainstream (diff) | |
| download | dwm-39af3c2607de029b66498064c4fc374df34fc653.tar.gz dwm-39af3c2607de029b66498064c4fc374df34fc653.zip | |
renamed monocle into maxmise, documented the keybindings in dwm(1)
Diffstat (limited to '')
| -rw-r--r-- | config.def.h | 12 | ||||
| -rw-r--r-- | dwm.1 | 31 | ||||
| -rw-r--r-- | dwm.c | 11 |
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 */ |
| 15 | const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; | 15 | const char tags[][MAXLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; |
| 16 | 16 | ||
| 17 | Rule rules[] = { | 17 | Rule 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 | |||
| 29 | Layout layouts[] = { | 30 | Layout 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 }, |
| @@ -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 |
| 8 | dwm is a dynamic window manager for X. It manages windows in tiled and | 8 | dwm is a dynamic window manager for X. It manages windows in tiled, maximised |
| 9 | floating layouts. Either layout can be applied dynamically, optimizing the | 9 | and floating layouts. Either layout can be applied dynamically, optimising the |
| 10 | environment for the application in use and the task performed. | 10 | environment for the application in use and the task performed. |
| 11 | .P | 11 | .P |
| 12 | In tiled layout windows are managed in a master and stacking area. The master | 12 | In tiled layout windows are managed in a master and stacking area. The master |
| 13 | area contains the window which currently needs most attention, whereas the | 13 | area contains the window which currently needs most attention, whereas the |
| 14 | stacking area contains all other windows. In floating layout windows can be | 14 | stacking area contains all other windows. In maximised layout all windows are |
| 15 | resized and moved freely. Dialog windows are always managed floating, | 15 | maximised to the screen size. In floating layout windows can be resized and |
| 16 | regardless of the layout applied. | 16 | moved freely. Dialog windows are always managed floating, regardless of the |
| 17 | layout applied. | ||
| 17 | .P | 18 | .P |
| 18 | Windows are grouped by tags. Each window can be tagged with one or multiple | 19 | Windows are grouped by tags. Each window can be tagged with one or multiple |
| 19 | tags. Selecting certain tags displays all windows with these tags. | 20 | tags. Selecting certain tags displays all windows with these tags. |
| 20 | .P | 21 | .P |
| 21 | dwm contains a small status bar which displays all available tags, the layout, | 22 | dwm contains a small status bar which displays all available tags, the layout, |
| 22 | the title of the focused window, and the text read from standard input. A | 23 | the title of the focused window, and the text read from standard input. A |
| 23 | floating window is indicated with an empty square and a maximized | 24 | floating window is indicated with an empty square and a maximised |
| 24 | floating window is indicated with a filled square before the windows | 25 | floating window is indicated with a filled square before the windows |
| 25 | title. The selected tags are indicated with a different color. The tags of | 26 | title. The selected tags are indicated with a different color. The tags of |
| 26 | the focused window are indicated with a filled square in the top left | 27 | the 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 |
| 63 | Toggles to the previously selected tags. | 64 | Toggles to the previously selected tags. |
| 64 | .TP | 65 | .TP |
| 66 | .B Mod1\-t | ||
| 67 | Applies tiled layout. | ||
| 68 | .TP | ||
| 69 | .B Mod1\-f | ||
| 70 | Applies loating layout. | ||
| 71 | .TP | ||
| 72 | .B Mod1\-m | ||
| 73 | Applies maximised layout. | ||
| 74 | .TP | ||
| 75 | .B Mod1\-space | ||
| 76 | Toggles between layouts. | ||
| 77 | .TP | ||
| 65 | .B Mod1\-b | 78 | .B Mod1\-b |
| 66 | Shows/hides the status bar. | 79 | Shows/hides the status bar. |
| 67 | .TP | 80 | .TP |
| @@ -77,9 +90,6 @@ Focus previous window. | |||
| 77 | .B Mod1\-l | 90 | .B Mod1\-l |
| 78 | Increases the master area width about 5% (tiled layout only). | 91 | Increases the master area width about 5% (tiled layout only). |
| 79 | .TP | 92 | .TP |
| 80 | .B Mod1\-m | ||
| 81 | Maximizes current window (floating layout/window only). | ||
| 82 | .TP | ||
| 83 | .B Mod1\-r | 93 | .B Mod1\-r |
| 84 | Re-applies tagging rules to all windows. | 94 | Re-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 |
| 100 | Close focused window. | 110 | Close focused window. |
| 101 | .TP | 111 | .TP |
| 102 | .B Mod1\-space | ||
| 103 | Toggle between tiled and floating layout (affects all windows). | ||
| 104 | .TP | ||
| 105 | .B Mod1\-Shift\-space | 112 | .B Mod1\-Shift\-space |
| 106 | Toggle focused window between tiled and floating state. | 113 | Toggle focused window between tiled and floating state. |
| 107 | .TP | 114 | .TP |
| @@ -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); | |||
| 153 | void manage(Window w, XWindowAttributes *wa); | 153 | void manage(Window w, XWindowAttributes *wa); |
| 154 | void mappingnotify(XEvent *e); | 154 | void mappingnotify(XEvent *e); |
| 155 | void maprequest(XEvent *e); | 155 | void maprequest(XEvent *e); |
| 156 | void monocle(void); | 156 | void maximise(void); |
| 157 | void movemouse(Client *c); | 157 | void movemouse(Client *c); |
| 158 | Client *nexttiled(Client *c); | 158 | Client *nexttiled(Client *c); |
| 159 | void propertynotify(XEvent *e); | 159 | void propertynotify(XEvent *e); |
| @@ -1073,13 +1073,12 @@ maprequest(XEvent *e) { | |||
| 1073 | } | 1073 | } |
| 1074 | 1074 | ||
| 1075 | void | 1075 | void |
| 1076 | monocle(void) { | 1076 | maximise(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 | ||
| 1085 | void | 1084 | void |
