summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarg@mig29 <unknown>2006-11-27 10:57:37 +0100
committerarg@mig29 <unknown>2006-11-27 10:57:37 +0100
commit46d5f9d1bfd8caaabaabfb7c7e5eac269aff4987 (patch)
treeaef384fcafe76d5d5c527a77ed2d6864fea3fe81
parentapplied Jukka's patch preventing some cornercases and making the EOF error me... (diff)
downloaddwm-46d5f9d1bfd8caaabaabfb7c7e5eac269aff4987.tar.gz
dwm-46d5f9d1bfd8caaabaabfb7c7e5eac269aff4987.zip
added togglefloat to hg tip (i consider this useful for some cases), using MODKEY-Shift-space as shortcut
Diffstat (limited to '')
-rw-r--r--config.arg.h1
-rw-r--r--config.default.h1
-rw-r--r--dwm.h1
-rw-r--r--view.c8
4 files changed, 11 insertions, 0 deletions
diff --git a/config.arg.h b/config.arg.h
index 3215c77..e6ea4ea 100644
--- a/config.arg.h
+++ b/config.arg.h
@@ -45,6 +45,7 @@ static Key key[] = { \
45 { MODKEY|ControlMask|ShiftMask, XK_4, toggletag, { .i = 3 } }, \ 45 { MODKEY|ControlMask|ShiftMask, XK_4, toggletag, { .i = 3 } }, \
46 { MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \ 46 { MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \
47 { MODKEY, XK_space, togglemode, { 0 } }, \ 47 { MODKEY, XK_space, togglemode, { 0 } }, \
48 { MODKEY|ShiftMask, XK_space, togglefloat, { 0 } }, \
48 { MODKEY, XK_0, viewall, { 0 } }, \ 49 { MODKEY, XK_0, viewall, { 0 } }, \
49 { MODKEY, XK_1, view, { .i = 0 } }, \ 50 { MODKEY, XK_1, view, { .i = 0 } }, \
50 { MODKEY, XK_2, view, { .i = 1 } }, \ 51 { MODKEY, XK_2, view, { .i = 1 } }, \
diff --git a/config.default.h b/config.default.h
index 85cc135..acacfdc 100644
--- a/config.default.h
+++ b/config.default.h
@@ -42,6 +42,7 @@ static Key key[] = { \
42 { MODKEY|ControlMask|ShiftMask, XK_5, toggletag, { .i = 4 } }, \ 42 { MODKEY|ControlMask|ShiftMask, XK_5, toggletag, { .i = 4 } }, \
43 { MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \ 43 { MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \
44 { MODKEY, XK_space, togglemode, { 0 } }, \ 44 { MODKEY, XK_space, togglemode, { 0 } }, \
45 { MODKEY|ShiftMask, XK_space, togglefloat, { 0 } }, \
45 { MODKEY, XK_0, viewall, { 0 } }, \ 46 { MODKEY, XK_0, viewall, { 0 } }, \
46 { MODKEY, XK_1, view, { .i = 0 } }, \ 47 { MODKEY, XK_1, view, { .i = 0 } }, \
47 { MODKEY, XK_2, view, { .i = 1 } }, \ 48 { MODKEY, XK_2, view, { .i = 1 } }, \
diff --git a/dwm.h b/dwm.h
index 18672d0..1f7dfe8 100644
--- a/dwm.h
+++ b/dwm.h
@@ -164,6 +164,7 @@ extern void focusprev(Arg *arg); /* focuses previous visible client, arg is ign
164extern Bool isvisible(Client *c); /* returns True if client is visible */ 164extern Bool isvisible(Client *c); /* returns True if client is visible */
165extern void resizemaster(Arg *arg); /* resizes the master percent with arg's index value */ 165extern void resizemaster(Arg *arg); /* resizes the master percent with arg's index value */
166extern void restack(void); /* restores z layers of all clients */ 166extern void restack(void); /* restores z layers of all clients */
167extern void togglefloat(Arg *arg); /* toggles selected client floating/tiled resp. */
167extern void togglemode(Arg *arg); /* toggles global arrange function (dotile/dofloat) */ 168extern void togglemode(Arg *arg); /* toggles global arrange function (dotile/dofloat) */
168extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */ 169extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */
169extern void view(Arg *arg); /* views the tag with arg's index */ 170extern void view(Arg *arg); /* views the tag with arg's index */
diff --git a/view.c b/view.c
index e7d7a99..21e7bbd 100644
--- a/view.c
+++ b/view.c
@@ -201,6 +201,14 @@ restack(void) {
201} 201}
202 202
203void 203void
204togglefloat(Arg *arg) {
205 if (!sel)
206 return;
207 sel->isfloat = !sel->isfloat;
208 arrange();
209}
210
211void
204togglemode(Arg *arg) { 212togglemode(Arg *arg) {
205 arrange = (arrange == dofloat) ? dotile : dofloat; 213 arrange = (arrange == dofloat) ? dotile : dofloat;
206 if(sel) 214 if(sel)