1
0

renamed monocle into maxmise, documented the keybindings in dwm(1)

This commit is contained in:
anselm@anselm1 2008-03-04 21:40:49 +00:00
parent 96ee9d888c
commit 39af3c2607
3 changed files with 31 additions and 23 deletions

View File

@ -11,8 +11,8 @@
#define SELBGCOLOR "#0066ff"
#define SELFGCOLOR "#ffffff"
/* old */
const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
/* tagging */
const char tags[][MAXLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
Rule rules[] = {
/* class:instance:title substr tags ref isfloating */
@ -26,11 +26,12 @@ Rule rules[] = {
#define MWFACT 0.6 /* master width factor [0.1 .. 0.9] */
#define RESIZEHINTS True /* False - respect size hints in tiled resizals */
#define SNAP 32 /* snap pixel */
Layout layouts[] = {
/* symbol function */
{ "[]=", tile }, /* first entry is default */
{ "><>", floating },
{ "[M]", monocle },
{ "[M]", maximise },
};
/* key definitions */
@ -40,14 +41,15 @@ Key keys[] = {
{ MODKEY, XK_p, spawn,
"exec dmenu_run -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"' -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"'" },
{ MODKEY|ShiftMask, XK_Return, spawn, "exec uxterm" },
{ MODKEY, XK_space, setlayout, NULL },
{ MODKEY, XK_b, togglebar, NULL },
{ MODKEY, XK_t, setlayout, "[]=" },
{ MODKEY, XK_f, setlayout, "><>" },
{ MODKEY, XK_m , setlayout, "[M]" },
{ MODKEY, XK_j, focusnext, NULL },
{ MODKEY, XK_k, focusprev, NULL },
{ MODKEY, XK_h, setmwfact, "-0.05" },
{ MODKEY, XK_l, setmwfact, "+0.05" },
{ MODKEY, XK_r, reapply, NULL },
{ MODKEY, XK_m, setlayout, "[M]" },
{ MODKEY, XK_Return, zoom, NULL },
{ MODKEY, XK_Tab, viewprevtag, NULL },
{ MODKEY|ShiftMask, XK_space, togglefloating, NULL },

31
dwm.1
View File

@ -5,22 +5,23 @@ dwm \- dynamic window manager
.B dwm
.RB [ \-v ]
.SH DESCRIPTION
dwm is a dynamic window manager for X. It manages windows in tiled and
floating layouts. Either layout can be applied dynamically, optimizing the
dwm is a dynamic window manager for X. It manages windows in tiled, maximised
and floating layouts. Either layout can be applied dynamically, optimising the
environment for the application in use and the task performed.
.P
In tiled layout windows are managed in a master and stacking area. The master
area contains the window which currently needs most attention, whereas the
stacking area contains all other windows. In floating layout windows can be
resized and moved freely. Dialog windows are always managed floating,
regardless of the layout applied.
stacking area contains all other windows. In maximised layout all windows are
maximised to the screen size. In floating layout windows can be resized and
moved freely. Dialog windows are always managed floating, regardless of the
layout applied.
.P
Windows are grouped by tags. Each window can be tagged with one or multiple
tags. Selecting certain tags displays all windows with these tags.
.P
dwm contains a small status bar which displays all available tags, the layout,
the title of the focused window, and the text read from standard input. A
floating window is indicated with an empty square and a maximized
floating window is indicated with an empty square and a maximised
floating window is indicated with a filled square before the windows
title. The selected tags are indicated with a different color. The tags of
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).
.B Mod1\-Tab
Toggles to the previously selected tags.
.TP
.B Mod1\-t
Applies tiled layout.
.TP
.B Mod1\-f
Applies loating layout.
.TP
.B Mod1\-m
Applies maximised layout.
.TP
.B Mod1\-space
Toggles between layouts.
.TP
.B Mod1\-b
Shows/hides the status bar.
.TP
@ -77,9 +90,6 @@ Focus previous window.
.B Mod1\-l
Increases the master area width about 5% (tiled layout only).
.TP
.B Mod1\-m
Maximizes current window (floating layout/window only).
.TP
.B Mod1\-r
Re-applies tagging rules to all windows.
.TP
@ -99,9 +109,6 @@ tag to/from current window.
.B Mod1\-Shift\-c
Close focused window.
.TP
.B Mod1\-space
Toggle between tiled and floating layout (affects all windows).
.TP
.B Mod1\-Shift\-space
Toggle focused window between tiled and floating state.
.TP

9
dwm.c
View File

@ -48,7 +48,7 @@
#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)
#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask))
#define LENGTH(x) (sizeof x / sizeof x[0])
#define MAXTAGLEN 16
#define MAXLEN 16
#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
@ -153,7 +153,7 @@ void killclient(const char *arg);
void manage(Window w, XWindowAttributes *wa);
void mappingnotify(XEvent *e);
void maprequest(XEvent *e);
void monocle(void);
void maximise(void);
void movemouse(Client *c);
Client *nexttiled(Client *c);
void propertynotify(XEvent *e);
@ -1073,12 +1073,11 @@ maprequest(XEvent *e) {
}
void
monocle(void) {
maximise(void) {
Client *c;
domwfact = dozoom = False;
for(c = clients; c; c = c->next)
if(isvisible(c))
for(c = nexttiled(clients); c; c = nexttiled(c->next))
resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
}