Xinqi Bao's Git
projects
/
dwm.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
96ee9d8
)
renamed monocle into maxmise, documented the keybindings in dwm(1)
author
anselm@anselm1 <unknown>
Tue, 4 Mar 2008 21:40:49 +0000
(21:40 +0000)
committer
anselm@anselm1 <unknown>
Tue, 4 Mar 2008 21:40:49 +0000
(21:40 +0000)
config.def.h
diff
|
blob
|
history
dwm.1
diff
|
blob
|
history
dwm.c
diff
|
blob
|
history
diff --git
a/config.def.h
b/config.def.h
index
11993da
..
72ada0e
100644
(file)
--- a/
config.def.h
+++ b/
config.def.h
@@
-11,8
+11,8
@@
#define SELBGCOLOR "#0066ff"
#define SELFGCOLOR "#ffffff"
#define SELBGCOLOR "#0066ff"
#define SELFGCOLOR "#ffffff"
-/*
old
*/
-const char tags[][MAX
TAG
LEN] = { "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 */
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 */
#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 },
Layout layouts[] = {
/* symbol function */
{ "[]=", tile }, /* first entry is default */
{ "><>", floating },
- { "[M]", m
onocl
e },
+ { "[M]", m
aximis
e },
};
/* key definitions */
};
/* 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_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_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_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 },
{ MODKEY, XK_Return, zoom, NULL },
{ MODKEY, XK_Tab, viewprevtag, NULL },
{ MODKEY|ShiftMask, XK_space, togglefloating, NULL },
diff --git
a/dwm.1
b/dwm.1
index
934c124
..
4737ba2
100644
(file)
--- a/
dwm.1
+++ b/
dwm.1
@@
-5,22
+5,23
@@
dwm \- dynamic window manager
.B dwm
.RB [ \-v ]
.SH DESCRIPTION
.B dwm
.RB [ \-v ]
.SH DESCRIPTION
-dwm is a dynamic window manager for X. It manages windows in tiled
an
d
-
floating layouts. Either layout can be applied dynamically, optimiz
ing the
+dwm is a dynamic window manager for X. It manages windows in tiled
, maximise
d
+
and floating layouts. Either layout can be applied dynamically, optimis
ing 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
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
.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 maximi
z
ed
+floating window is indicated with an empty square and a maximi
s
ed
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
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\-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
.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\-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
.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\-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
.B Mod1\-Shift\-space
Toggle focused window between tiled and floating state.
.TP
diff --git
a/dwm.c
b/dwm.c
index
b417167
..
b8db678
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-48,7
+48,7
@@
#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)
#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask))
#define LENGTH(x) (sizeof x / sizeof x[0])
#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)
#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask))
#define LENGTH(x) (sizeof x / sizeof x[0])
-#define MAX
TAGLEN
16
+#define MAX
LEN
16
#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
#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 manage(Window w, XWindowAttributes *wa);
void mappingnotify(XEvent *e);
void maprequest(XEvent *e);
-void m
onocl
e(void);
+void m
aximis
e(void);
void movemouse(Client *c);
Client *nexttiled(Client *c);
void propertynotify(XEvent *e);
void movemouse(Client *c);
Client *nexttiled(Client *c);
void propertynotify(XEvent *e);
@@
-1073,13
+1073,12
@@
maprequest(XEvent *e) {
}
void
}
void
-m
onocl
e(void) {
+m
aximis
e(void) {
Client *c;
domwfact = dozoom = False;
Client *c;
domwfact = dozoom = False;
- for(c = clients; c; c = c->next)
- if(isvisible(c))
- resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
+ for(c = nexttiled(clients); c; c = nexttiled(c->next))
+ resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
}
void
}
void