aewl

changeset 584:37281ebc1b5b

added togglefloat to hg tip (i consider this useful for some cases), using MODKEY-Shift-space as shortcut
author arg@mig29
date Mon, 27 Nov 2006 10:57:37 +0100
parents f4285a97e3e6
children 83807f4d18e9
files config.arg.h config.default.h dwm.h view.c
diffstat 4 files changed, 11 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/config.arg.h	Mon Nov 27 10:29:47 2006 +0100
     1.2 +++ b/config.arg.h	Mon Nov 27 10:57:37 2006 +0100
     1.3 @@ -45,6 +45,7 @@
     1.4  	{ MODKEY|ControlMask|ShiftMask,	XK_4,		toggletag,	{ .i = 3 } }, \
     1.5  	{ MODKEY|ShiftMask,		XK_c,		killclient,	{ 0 } }, \
     1.6  	{ MODKEY,			XK_space,	togglemode,	{ 0 } }, \
     1.7 +	{ MODKEY|ShiftMask,		XK_space,	togglefloat,	{ 0 } }, \
     1.8  	{ MODKEY,			XK_0,		viewall,	{ 0 } }, \
     1.9  	{ MODKEY,			XK_1,		view,		{ .i = 0 } }, \
    1.10  	{ MODKEY,			XK_2,		view,		{ .i = 1 } }, \
     2.1 --- a/config.default.h	Mon Nov 27 10:29:47 2006 +0100
     2.2 +++ b/config.default.h	Mon Nov 27 10:57:37 2006 +0100
     2.3 @@ -42,6 +42,7 @@
     2.4  	{ MODKEY|ControlMask|ShiftMask,	XK_5,		toggletag,	{ .i = 4 } }, \
     2.5  	{ MODKEY|ShiftMask,		XK_c,		killclient,	{ 0 } }, \
     2.6  	{ MODKEY,			XK_space,	togglemode,	{ 0 } }, \
     2.7 +	{ MODKEY|ShiftMask,		XK_space,	togglefloat,	{ 0 } }, \
     2.8  	{ MODKEY,			XK_0,		viewall,	{ 0 } }, \
     2.9  	{ MODKEY,			XK_1,		view,		{ .i = 0 } }, \
    2.10  	{ MODKEY,			XK_2,		view,		{ .i = 1 } }, \
     3.1 --- a/dwm.h	Mon Nov 27 10:29:47 2006 +0100
     3.2 +++ b/dwm.h	Mon Nov 27 10:57:37 2006 +0100
     3.3 @@ -164,6 +164,7 @@
     3.4  extern Bool isvisible(Client *c);		/* returns True if client is visible */
     3.5  extern void resizemaster(Arg *arg);		/* resizes the master percent with arg's index value */
     3.6  extern void restack(void);			/* restores z layers of all clients */
     3.7 +extern void togglefloat(Arg *arg);		/* toggles selected client floating/tiled resp. */
     3.8  extern void togglemode(Arg *arg);		/* toggles global arrange function (dotile/dofloat) */
     3.9  extern void toggleview(Arg *arg);		/* toggles the tag with arg's index (in)visible */
    3.10  extern void view(Arg *arg);			/* views the tag with arg's index */
     4.1 --- a/view.c	Mon Nov 27 10:29:47 2006 +0100
     4.2 +++ b/view.c	Mon Nov 27 10:57:37 2006 +0100
     4.3 @@ -201,6 +201,14 @@
     4.4  }
     4.5  
     4.6  void
     4.7 +togglefloat(Arg *arg) {
     4.8 +	if (!sel)
     4.9 +		return;
    4.10 +	sel->isfloat = !sel->isfloat;
    4.11 +	arrange();
    4.12 +}
    4.13 +
    4.14 +void
    4.15  togglemode(Arg *arg) {
    4.16  	arrange = (arrange == dofloat) ? dotile : dofloat;
    4.17  	if(sel)