dwm-meillo

changeset 293:093744cc5353

applied jk_to_tab patch
author Anselm R.Garbe <arg@10ksloc.org>
date Tue, 15 Aug 2006 08:25:11 +0200
parents 4aa632b6ba66
children 0788e46843c0
files config.default.h dwm.1 main.c
diffstat 3 files changed, 63 insertions(+), 56 deletions(-) [+]
line diff
     1.1 --- a/config.default.h	Tue Aug 15 07:31:42 2006 +0200
     1.2 +++ b/config.default.h	Tue Aug 15 08:25:11 2006 +0200
     1.3 @@ -18,34 +18,34 @@
     1.4  #define KEYS \
     1.5  static Key key[] = { \
     1.6  	/* modifier			key		function	arguments */ \
     1.7 +	{ MODKEY|ShiftMask,		XK_Return,	spawn,		{ .cmd = "exec xterm" } }, \
     1.8 +	{ MODKEY,			XK_Tab,		focusnext,	{ 0 } }, \
     1.9 +	{ MODKEY|ShiftMask,		XK_Tab,		focusprev,	{ 0 } }, \
    1.10 +	{ MODKEY,			XK_Return,	zoom,		{ 0 } }, \
    1.11 +	{ MODKEY,			XK_m,		togglemax,	{ 0 } }, \
    1.12 +	{ MODKEY|ShiftMask,		XK_0,		tag,		{ .i = 0 } }, \
    1.13 +	{ MODKEY|ShiftMask,		XK_1,		tag,		{ .i = 1 } }, \
    1.14 +	{ MODKEY|ShiftMask,		XK_2,		tag,		{ .i = 2 } }, \
    1.15 +	{ MODKEY|ShiftMask,		XK_3,		tag,		{ .i = 3 } }, \
    1.16 +	{ MODKEY|ShiftMask,		XK_4,		tag,		{ .i = 4 } }, \
    1.17 +	{ MODKEY|ControlMask|ShiftMask,	XK_0,		toggletag,	{ .i = 0 } }, \
    1.18 +	{ MODKEY|ControlMask|ShiftMask,	XK_1,		toggletag,	{ .i = 1 } }, \
    1.19 +	{ MODKEY|ControlMask|ShiftMask,	XK_2,		toggletag,	{ .i = 2 } }, \
    1.20 +	{ MODKEY|ControlMask|ShiftMask,	XK_3,		toggletag,	{ .i = 3 } }, \
    1.21 +	{ MODKEY|ControlMask|ShiftMask,	XK_4,		toggletag,	{ .i = 4 } }, \
    1.22 +	{ MODKEY|ShiftMask,		XK_c,		killclient,	{ 0 } }, \
    1.23 +	{ MODKEY,			XK_space,	togglemode,	{ 0 } }, \
    1.24  	{ MODKEY,			XK_0,		view,		{ .i = 0 } }, \
    1.25  	{ MODKEY,			XK_1,		view,		{ .i = 1 } }, \
    1.26  	{ MODKEY,			XK_2,		view,		{ .i = 2 } }, \
    1.27  	{ MODKEY,			XK_3,		view,		{ .i = 3 } }, \
    1.28  	{ MODKEY,			XK_4,		view,		{ .i = 4 } }, \
    1.29 -	{ MODKEY,			XK_j,		focusnext,	{ 0 } }, \
    1.30 -	{ MODKEY,			XK_k,		focusprev,	{ 0 } }, \
    1.31 -	{ MODKEY,			XK_m,		togglemax,	{ 0 } }, \
    1.32 -	{ MODKEY,			XK_space,	togglemode,	{ 0 } }, \
    1.33 -	{ MODKEY,			XK_Return,	zoom,		{ 0 } }, \
    1.34  	{ MODKEY|ControlMask,		XK_0,		toggleview,	{ .i = 0 } }, \
    1.35  	{ MODKEY|ControlMask,		XK_1,		toggleview,	{ .i = 1 } }, \
    1.36  	{ MODKEY|ControlMask,		XK_2,		toggleview,	{ .i = 2 } }, \
    1.37  	{ MODKEY|ControlMask,		XK_3,		toggleview,	{ .i = 3 } }, \
    1.38  	{ MODKEY|ControlMask,		XK_4,		toggleview,	{ .i = 4 } }, \
    1.39 -	{ MODKEY|ShiftMask,		XK_0,		tag,		{ .i = 0 } }, \
    1.40 -	{ MODKEY|ShiftMask,		XK_1,		tag,		{ .i = 1 } }, \
    1.41 -	{ MODKEY|ShiftMask,		XK_2,		tag,		{ .i = 2 } }, \
    1.42 -	{ MODKEY|ShiftMask,		XK_3,		tag,		{ .i = 3 } }, \
    1.43 -	{ MODKEY|ShiftMask,		XK_4,		tag,		{ .i = 4 } }, \
    1.44 -	{ MODKEY|ShiftMask,		XK_c,		killclient,	{ 0 } }, \
    1.45  	{ MODKEY|ShiftMask,		XK_q,		quit,		{ 0 } }, \
    1.46 -	{ MODKEY|ShiftMask,		XK_Return,	spawn,		{ .cmd = "exec xterm" } }, \
    1.47 -	{ MODKEY|ControlMask|ShiftMask,	XK_0,		toggletag,	{ .i = 0 } }, \
    1.48 -	{ MODKEY|ControlMask|ShiftMask,	XK_1,		toggletag,	{ .i = 1 } }, \
    1.49 -	{ MODKEY|ControlMask|ShiftMask,	XK_2,		toggletag,	{ .i = 2 } }, \
    1.50 -	{ MODKEY|ControlMask|ShiftMask,	XK_3,		toggletag,	{ .i = 3 } }, \
    1.51 -	{ MODKEY|ControlMask|ShiftMask,	XK_4,		toggletag,	{ .i = 4 } }, \
    1.52  };
    1.53  
    1.54  #define RULES \
     2.1 --- a/dwm.1	Tue Aug 15 07:31:42 2006 +0200
     2.2 +++ b/dwm.1	Tue Aug 15 08:25:11 2006 +0200
     2.3 @@ -46,28 +46,46 @@
     2.4  to/from the view.
     2.5  .SS Keyboard commands
     2.6  .TP
     2.7 +.B Mod1-Shift-Return
     2.8 +Start
     2.9 +.BR xterm (1).
    2.10 +.TP
    2.11 +.B Mod1-Tab
    2.12 +Focus next
    2.13 +.BR window .
    2.14 +.TP
    2.15 +.B Mod1-Shift-Tab
    2.16 +Focus previous
    2.17 +.BR window .
    2.18 +.TP
    2.19  .B Mod1-Return
    2.20  Zoom current
    2.21  .B window
    2.22  to the 
    2.23  .B master
    2.24 -column.
    2.25 -.TP
    2.26 -.B Mod1-j
    2.27 -Focus next
    2.28 -.BR window .
    2.29 -.TP
    2.30 -.B Mod1-k
    2.31 -Focus previous
    2.32 -.BR window .
    2.33 +column
    2.34 +.RB ( tiling
    2.35 +mode only).
    2.36  .TP
    2.37  .B Mod1-m
    2.38  Maximize current
    2.39  .BR window .
    2.40  .TP
    2.41 -.B Mod1-[0..n]
    2.42 -View all windows with
    2.43 -.BR "tag n" .
    2.44 +.B Mod1-Shift-[0..n]
    2.45 +Apply
    2.46 +.B nth tag
    2.47 +to current
    2.48 +.BR window .
    2.49 +.TP
    2.50 +.B Mod1-Control-Shift-[0..n]
    2.51 +Add/remove
    2.52 +.B nth tag
    2.53 +to/from current
    2.54 +.BR window .
    2.55 +.TP
    2.56 +.B Mod1-Shift-c
    2.57 +Close focused
    2.58 +.B window.
    2.59  .TP
    2.60  .B Mod1-space
    2.61  Toggle between
    2.62 @@ -77,52 +95,42 @@
    2.63  mode (affects
    2.64  .BR "all windows" ).
    2.65  .TP
    2.66 -.B Mod1-Shift-[0..n]
    2.67 -Apply
    2.68 -.B nth tag
    2.69 -to current
    2.70 -.BR window .
    2.71 -.TP
    2.72 -.B Mod1-Shift-c
    2.73 -Close focused
    2.74 -.B window.
    2.75 -.TP
    2.76 -.B Mod1-Shift-q
    2.77 -Quit
    2.78 -.B dwm.
    2.79 -.TP
    2.80 -.B Mod1-Shift-Return
    2.81 -Start
    2.82 -.BR terminal .
    2.83 +.B Mod1-[0..n]
    2.84 +View all windows with
    2.85 +.BR "tag n" .
    2.86  .TP
    2.87  .B Mod1-Control-[0..n]
    2.88  Add/remove all windows with
    2.89  .B tag n
    2.90  to/from the view.
    2.91  .TP
    2.92 -.B Mod1-Control-Shift-[0..n]
    2.93 -Add/remove
    2.94 -.B nth tag
    2.95 -to/from current
    2.96 -.BR window .
    2.97 +.B Mod1-Shift-q
    2.98 +Quit
    2.99 +.B dwm.
   2.100  .SS Mouse commands
   2.101  .TP
   2.102  .B Mod1-Button1
   2.103  Move current
   2.104  .B window
   2.105 -while dragging.
   2.106 +while dragging
   2.107 +.RB ( floating
   2.108 +mode only).
   2.109  .TP
   2.110  .B Mod1-Button2
   2.111  Zoom current
   2.112  .B window
   2.113  to the 
   2.114  .B master
   2.115 -column.
   2.116 +column
   2.117 +.RB ( tiling
   2.118 +mode only).
   2.119  .TP
   2.120  .B Mod1-Button3
   2.121  Resize current
   2.122  .B window
   2.123 -while dragging.
   2.124 +while dragging
   2.125 +.RB ( floating
   2.126 +mode only).
   2.127  .SH CUSTOMIZATION
   2.128  .B dwm
   2.129  is customized by creating a custom config.h and (re)compiling the source
     3.1 --- a/main.c	Tue Aug 15 07:31:42 2006 +0200
     3.2 +++ b/main.c	Tue Aug 15 08:25:11 2006 +0200
     3.3 @@ -291,9 +291,8 @@
     3.4  					strcpy(stext, "broken pipe");
     3.5  				drawstatus();
     3.6  			}
     3.7 -			if(FD_ISSET(xfd, &rd))
     3.8 -				procevent();
     3.9  		}
    3.10 +		procevent();
    3.11  	}
    3.12  	cleanup();
    3.13  	XCloseDisplay(dpy);