diff options
| author | Anselm R. Garbe <arg@suckless.org> | 2007-02-19 17:12:26 +0100 |
|---|---|---|
| committer | Anselm R. Garbe <arg@suckless.org> | 2007-02-19 17:12:26 +0100 |
| commit | 6d5f67a0922d40d52290c12f9c0d937f4121406e (patch) | |
| tree | 54f519e2d10bbfd1e1be9de149d2e25ee4ee382c | |
| parent | renamed floating into swimming (this does not clash with C naming conventions... (diff) | |
| download | dwm-6d5f67a0922d40d52290c12f9c0d937f4121406e.tar.gz dwm-6d5f67a0922d40d52290c12f9c0d937f4121406e.zip | |
renames swim[ming] into versatile
Diffstat (limited to '')
| -rw-r--r-- | client.c | 8 | ||||
| -rw-r--r-- | config.arg.h | 6 | ||||
| -rw-r--r-- | config.default.h | 6 | ||||
| -rw-r--r-- | dwm.1 | 20 | ||||
| -rw-r--r-- | dwm.h | 6 | ||||
| -rw-r--r-- | event.c | 8 | ||||
| -rw-r--r-- | screen.c | 74 |
7 files changed, 64 insertions, 64 deletions
| @@ -253,8 +253,8 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 253 | updatetitle(c); | 253 | updatetitle(c); |
| 254 | for(t = clients; t && t->win != trans; t = t->next); | 254 | for(t = clients; t && t->win != trans; t = t->next); |
| 255 | settags(c, t); | 255 | settags(c, t); |
| 256 | if(!c->swimming) | 256 | if(!c->versatile) |
| 257 | c->swimming = (t != NULL) || c->isfixed; | 257 | c->versatile = (t != NULL) || c->isfixed; |
| 258 | attach(c); | 258 | attach(c); |
| 259 | attachstack(c); | 259 | attachstack(c); |
| 260 | c->isbanned = True; | 260 | c->isbanned = True; |
| @@ -268,7 +268,7 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 268 | 268 | ||
| 269 | Client * | 269 | Client * |
| 270 | nexttiled(Client *c) { | 270 | nexttiled(Client *c) { |
| 271 | for(; c && (c->swimming || !isvisible(c)); c = c->next); | 271 | for(; c && (c->versatile || !isvisible(c)); c = c->next); |
| 272 | return c; | 272 | return c; |
| 273 | } | 273 | } |
| 274 | 274 | ||
| @@ -440,7 +440,7 @@ zoom(Arg *arg) { | |||
| 440 | 440 | ||
| 441 | if(!sel) | 441 | if(!sel) |
| 442 | return; | 442 | return; |
| 443 | if(sel->swimming || (lt->arrange == swim)) { | 443 | if(sel->versatile || (lt->arrange == versatile)) { |
| 444 | togglemax(sel); | 444 | togglemax(sel); |
| 445 | return; | 445 | return; |
| 446 | } | 446 | } |
diff --git a/config.arg.h b/config.arg.h index 7b54ca2..05bcd07 100644 --- a/config.arg.h +++ b/config.arg.h | |||
| @@ -9,7 +9,7 @@ const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL }; | |||
| 9 | static Layout layout[] = { \ | 9 | static Layout layout[] = { \ |
| 10 | /* symbol function */ \ | 10 | /* symbol function */ \ |
| 11 | { "[]=", tile }, /* first entry is default */ \ | 11 | { "[]=", tile }, /* first entry is default */ \ |
| 12 | { "><>", swim }, \ | 12 | { "><>", versatile }, \ |
| 13 | }; | 13 | }; |
| 14 | 14 | ||
| 15 | #define BORDERPX 1 | 15 | #define BORDERPX 1 |
| @@ -64,7 +64,7 @@ static Key key[] = { \ | |||
| 64 | { MODKEY|ControlMask|ShiftMask, XK_9, toggletag, { .i = 8 } }, \ | 64 | { MODKEY|ControlMask|ShiftMask, XK_9, toggletag, { .i = 8 } }, \ |
| 65 | { MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \ | 65 | { MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \ |
| 66 | { MODKEY, XK_space, togglelayout, { 0 } }, \ | 66 | { MODKEY, XK_space, togglelayout, { 0 } }, \ |
| 67 | { MODKEY|ShiftMask, XK_space, toggleswimming, { 0 } }, \ | 67 | { MODKEY|ShiftMask, XK_space, toggleversatile,{ 0 } }, \ |
| 68 | { MODKEY, XK_0, view, { .i = -1 } }, \ | 68 | { MODKEY, XK_0, view, { .i = -1 } }, \ |
| 69 | { MODKEY, XK_1, view, { .i = 0 } }, \ | 69 | { MODKEY, XK_1, view, { .i = 0 } }, \ |
| 70 | { MODKEY, XK_2, view, { .i = 1 } }, \ | 70 | { MODKEY, XK_2, view, { .i = 1 } }, \ |
| @@ -89,7 +89,7 @@ static Key key[] = { \ | |||
| 89 | 89 | ||
| 90 | #define RULES \ | 90 | #define RULES \ |
| 91 | static Rule rule[] = { \ | 91 | static Rule rule[] = { \ |
| 92 | /* class:instance:title regex tags regex swimming */ \ | 92 | /* class:instance:title regex tags regex versatile */ \ |
| 93 | { "Firefox", "3", False }, \ | 93 | { "Firefox", "3", False }, \ |
| 94 | { "Gimp", NULL, True }, \ | 94 | { "Gimp", NULL, True }, \ |
| 95 | { "MPlayer", NULL, True }, \ | 95 | { "MPlayer", NULL, True }, \ |
diff --git a/config.default.h b/config.default.h index 1b6b349..10000d9 100644 --- a/config.default.h +++ b/config.default.h | |||
| @@ -9,7 +9,7 @@ const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL }; | |||
| 9 | Layout layout[] = { \ | 9 | Layout layout[] = { \ |
| 10 | /* symbol function */ \ | 10 | /* symbol function */ \ |
| 11 | { "[]=", tile }, /* first entry is default */ \ | 11 | { "[]=", tile }, /* first entry is default */ \ |
| 12 | { "><>", swim }, \ | 12 | { "><>", versatile }, \ |
| 13 | }; | 13 | }; |
| 14 | 14 | ||
| 15 | #define BORDERPX 1 | 15 | #define BORDERPX 1 |
| @@ -59,7 +59,7 @@ static Key key[] = { \ | |||
| 59 | { MODKEY|ControlMask|ShiftMask, XK_9, toggletag, { .i = 8 } }, \ | 59 | { MODKEY|ControlMask|ShiftMask, XK_9, toggletag, { .i = 8 } }, \ |
| 60 | { MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \ | 60 | { MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \ |
| 61 | { MODKEY, XK_space, togglelayout, { 0 } }, \ | 61 | { MODKEY, XK_space, togglelayout, { 0 } }, \ |
| 62 | { MODKEY|ShiftMask, XK_space, toggleswimming, { 0 } }, \ | 62 | { MODKEY|ShiftMask, XK_space, toggleversatile { 0 } }, \ |
| 63 | { MODKEY, XK_0, view, { .i = -1 } }, \ | 63 | { MODKEY, XK_0, view, { .i = -1 } }, \ |
| 64 | { MODKEY, XK_1, view, { .i = 0 } }, \ | 64 | { MODKEY, XK_1, view, { .i = 0 } }, \ |
| 65 | { MODKEY, XK_2, view, { .i = 1 } }, \ | 65 | { MODKEY, XK_2, view, { .i = 1 } }, \ |
| @@ -86,7 +86,7 @@ static Key key[] = { \ | |||
| 86 | * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */ | 86 | * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */ |
| 87 | #define RULES \ | 87 | #define RULES \ |
| 88 | static Rule rule[] = { \ | 88 | static Rule rule[] = { \ |
| 89 | /* class:instance:title regex tags regex swimming */ \ | 89 | /* class:instance:title regex tags regex versatile */ \ |
| 90 | { "Gimp", NULL, True }, \ | 90 | { "Gimp", NULL, True }, \ |
| 91 | { "MPlayer", NULL, True }, \ | 91 | { "MPlayer", NULL, True }, \ |
| 92 | { "Acroread", NULL, True }, \ | 92 | { "Acroread", NULL, True }, \ |
| @@ -6,13 +6,13 @@ dwm \- dynamic window manager | |||
| 6 | .RB [ \-v ] | 6 | .RB [ \-v ] |
| 7 | .SH DESCRIPTION | 7 | .SH DESCRIPTION |
| 8 | dwm is a dynamic window manager for X. It manages windows in tiling and | 8 | dwm is a dynamic window manager for X. It manages windows in tiling and |
| 9 | swimming layouts. Either layout can be applied dynamically, optimizing the | 9 | versatile layouts. Either layout can be applied dynamically, optimizing the |
| 10 | environment for the application in use and the task performed. | 10 | environment for the application in use and the task performed. |
| 11 | .P | 11 | .P |
| 12 | In tiling layout windows are managed in a master and stacking area. The master | 12 | In tiling layout windows are managed in a master and stacking area. The master |
| 13 | area contains the windows which currently need most attention, whereas the | 13 | area contains the windows which currently need most attention, whereas the |
| 14 | stacking area contains all other windows. In swimming layout windows can be | 14 | stacking area contains all other windows. In versatile layout windows can be |
| 15 | resized and moved freely. Dialog windows are always managed swimming, | 15 | resized and moved freely. Dialog windows are always managed versatile, |
| 16 | regardless of the layout applied. | 16 | regardless of the layout applied. |
| 17 | .P | 17 | .P |
| 18 | Windows are grouped by tags. Each window can be tagged with one or multiple | 18 | Windows are grouped by tags. Each window can be tagged with one or multiple |
| @@ -38,7 +38,7 @@ is read and displayed in the status text area. | |||
| 38 | .TP | 38 | .TP |
| 39 | .B Button1 | 39 | .B Button1 |
| 40 | click on a tag label to display all windows with that tag, click on the layout | 40 | click on a tag label to display all windows with that tag, click on the layout |
| 41 | label toggles between tiling and swimming layout. | 41 | label toggles between tiling and versatile layout. |
| 42 | .TP | 42 | .TP |
| 43 | .B Button3 | 43 | .B Button3 |
| 44 | click on a tag label adds/removes all windows with that tag to/from the view. | 44 | click on a tag label adds/removes all windows with that tag to/from the view. |
| @@ -67,7 +67,7 @@ Focus next window. | |||
| 67 | Focus previous window. | 67 | Focus previous window. |
| 68 | .TP | 68 | .TP |
| 69 | .B Mod1-Return | 69 | .B Mod1-Return |
| 70 | Zooms/cycles current window to/from master area (tiling layout), toggles maximization of current window (swimming layout). | 70 | Zooms/cycles current window to/from master area (tiling layout), toggles maximization of current window (versatile layout). |
| 71 | .TP | 71 | .TP |
| 72 | .B Mod1-g | 72 | .B Mod1-g |
| 73 | Grow master area (tiling layout only). | 73 | Grow master area (tiling layout only). |
| @@ -98,10 +98,10 @@ tag to/from current window. | |||
| 98 | Close focused window. | 98 | Close focused window. |
| 99 | .TP | 99 | .TP |
| 100 | .B Mod1-space | 100 | .B Mod1-space |
| 101 | Toggle between tiling and swimming layout (affects all windows). | 101 | Toggle between tiling and versatile layout (affects all windows). |
| 102 | .TP | 102 | .TP |
| 103 | .B Mod1-Shift-space | 103 | .B Mod1-Shift-space |
| 104 | Toggle focused window between swimming and non-swimming state (tiling layout only). | 104 | Toggle focused window between versatile and non-versatile state (tiling layout only). |
| 105 | .TP | 105 | .TP |
| 106 | .B Mod1-[1..n] | 106 | .B Mod1-[1..n] |
| 107 | View all windows with | 107 | View all windows with |
| @@ -121,13 +121,13 @@ Quit dwm. | |||
| 121 | .SS Mouse commands | 121 | .SS Mouse commands |
| 122 | .TP | 122 | .TP |
| 123 | .B Mod1-Button1 | 123 | .B Mod1-Button1 |
| 124 | Move current window while dragging (swimming layout only). | 124 | Move current window while dragging (versatile layout only). |
| 125 | .TP | 125 | .TP |
| 126 | .B Mod1-Button2 | 126 | .B Mod1-Button2 |
| 127 | Zooms/cycles current window to/from master area (tiling layout), toggles maximization of current window (swimming layout). | 127 | Zooms/cycles current window to/from master area (tiling layout), toggles maximization of current window (versatile layout). |
| 128 | .TP | 128 | .TP |
| 129 | .B Mod1-Button3 | 129 | .B Mod1-Button3 |
| 130 | Resize current window while dragging (swimming layout only). | 130 | Resize current window while dragging (versatile layout only). |
| 131 | .SH CUSTOMIZATION | 131 | .SH CUSTOMIZATION |
| 132 | dwm is customized by creating a custom config.h and (re)compiling the source | 132 | dwm is customized by creating a custom config.h and (re)compiling the source |
| 133 | code. This keeps it fast, secure and simple. | 133 | code. This keeps it fast, secure and simple. |
| @@ -72,7 +72,7 @@ struct Client { | |||
| 72 | int minax, minay, maxax, maxay; | 72 | int minax, minay, maxax, maxay; |
| 73 | long flags; | 73 | long flags; |
| 74 | unsigned int border; | 74 | unsigned int border; |
| 75 | Bool isbanned, isfixed, ismax, swimming; | 75 | Bool isbanned, isfixed, ismax, versatile; |
| 76 | Bool *tags; | 76 | Bool *tags; |
| 77 | Client *next; | 77 | Client *next; |
| 78 | Client *prev; | 78 | Client *prev; |
| @@ -135,12 +135,12 @@ extern Bool isvisible(Client *c); /* returns True if client is visible */ | |||
| 135 | extern void resizemaster(Arg *arg); /* resizes the master percent with arg's index value */ | 135 | extern void resizemaster(Arg *arg); /* resizes the master percent with arg's index value */ |
| 136 | extern void restack(void); /* restores z layers of all clients */ | 136 | extern void restack(void); /* restores z layers of all clients */ |
| 137 | extern void settags(Client *c, Client *trans); /* sets tags of c */ | 137 | extern void settags(Client *c, Client *trans); /* sets tags of c */ |
| 138 | extern void swim(void); /* arranges all windows swimming */ | ||
| 139 | extern void tag(Arg *arg); /* tags c with arg's index */ | 138 | extern void tag(Arg *arg); /* tags c with arg's index */ |
| 140 | extern void toggleswimming(Arg *arg); /* toggles focusesd client between swimming/and non-swimming state */ | 139 | extern void toggleversatile(Arg *arg); /* toggles focusesd client between versatile/and non-versatile state */ |
| 141 | extern void togglelayout(Arg *arg); /* toggles layout */ | 140 | extern void togglelayout(Arg *arg); /* toggles layout */ |
| 142 | extern void toggletag(Arg *arg); /* toggles c tags with arg's index */ | 141 | extern void toggletag(Arg *arg); /* toggles c tags with arg's index */ |
| 143 | extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */ | 142 | extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */ |
| 143 | extern void versatile(void); /* arranges all windows versatile */ | ||
| 144 | extern void view(Arg *arg); /* views the tag with arg's index */ | 144 | extern void view(Arg *arg); /* views the tag with arg's index */ |
| 145 | 145 | ||
| 146 | /* util.c */ | 146 | /* util.c */ |
| @@ -156,14 +156,14 @@ buttonpress(XEvent *e) { | |||
| 156 | focus(c); | 156 | focus(c); |
| 157 | if(CLEANMASK(ev->state) != MODKEY) | 157 | if(CLEANMASK(ev->state) != MODKEY) |
| 158 | return; | 158 | return; |
| 159 | if(ev->button == Button1 && (lt->arrange == swim || c->swimming)) { | 159 | if(ev->button == Button1 && (lt->arrange == versatile || c->versatile)) { |
| 160 | restack(); | 160 | restack(); |
| 161 | movemouse(c); | 161 | movemouse(c); |
| 162 | } | 162 | } |
| 163 | else if(ev->button == Button2) | 163 | else if(ev->button == Button2) |
| 164 | zoom(NULL); | 164 | zoom(NULL); |
| 165 | else if(ev->button == Button3 | 165 | else if(ev->button == Button3 |
| 166 | && (lt->arrange == swim || c->swimming) && !c->isfixed) | 166 | && (lt->arrange == versatile || c->versatile) && !c->isfixed) |
| 167 | { | 167 | { |
| 168 | restack(); | 168 | restack(); |
| 169 | resizemouse(c); | 169 | resizemouse(c); |
| @@ -181,7 +181,7 @@ configurerequest(XEvent *e) { | |||
| 181 | c->ismax = False; | 181 | c->ismax = False; |
| 182 | if(ev->value_mask & CWBorderWidth) | 182 | if(ev->value_mask & CWBorderWidth) |
| 183 | c->border = ev->border_width; | 183 | c->border = ev->border_width; |
| 184 | if(c->isfixed || c->swimming || (lt->arrange == swim)) { | 184 | if(c->isfixed || c->versatile || (lt->arrange == versatile)) { |
| 185 | if(ev->value_mask & CWX) | 185 | if(ev->value_mask & CWX) |
| 186 | c->x = ev->x; | 186 | c->x = ev->x; |
| 187 | if(ev->value_mask & CWY) | 187 | if(ev->value_mask & CWY) |
| @@ -309,7 +309,7 @@ propertynotify(XEvent *e) { | |||
| 309 | default: break; | 309 | default: break; |
| 310 | case XA_WM_TRANSIENT_FOR: | 310 | case XA_WM_TRANSIENT_FOR: |
| 311 | XGetTransientForHint(dpy, c->win, &trans); | 311 | XGetTransientForHint(dpy, c->win, &trans); |
| 312 | if(!c->swimming && (c->swimming = (getclient(trans) != NULL))) | 312 | if(!c->versatile && (c->versatile = (getclient(trans) != NULL))) |
| 313 | lt->arrange(); | 313 | lt->arrange(); |
| 314 | break; | 314 | break; |
| 315 | case XA_WM_NORMAL_HINTS: | 315 | case XA_WM_NORMAL_HINTS: |
| @@ -19,7 +19,7 @@ Layout *lt = NULL; | |||
| 19 | typedef struct { | 19 | typedef struct { |
| 20 | const char *prop; | 20 | const char *prop; |
| 21 | const char *tags; | 21 | const char *tags; |
| 22 | Bool swimming; | 22 | Bool versatile; |
| 23 | } Rule; | 23 | } Rule; |
| 24 | 24 | ||
| 25 | typedef struct { | 25 | typedef struct { |
| @@ -52,7 +52,7 @@ tile(void) { | |||
| 52 | if(c->isbanned) | 52 | if(c->isbanned) |
| 53 | XMoveWindow(dpy, c->win, c->x, c->y); | 53 | XMoveWindow(dpy, c->win, c->x, c->y); |
| 54 | c->isbanned = False; | 54 | c->isbanned = False; |
| 55 | if(c->swimming) | 55 | if(c->versatile) |
| 56 | continue; | 56 | continue; |
| 57 | c->ismax = False; | 57 | c->ismax = False; |
| 58 | nx = wax; | 58 | nx = wax; |
| @@ -175,10 +175,10 @@ restack(void) { | |||
| 175 | drawstatus(); | 175 | drawstatus(); |
| 176 | if(!sel) | 176 | if(!sel) |
| 177 | return; | 177 | return; |
| 178 | if(sel->swimming || lt->arrange == swim) | 178 | if(sel->versatile || lt->arrange == versatile) |
| 179 | XRaiseWindow(dpy, sel->win); | 179 | XRaiseWindow(dpy, sel->win); |
| 180 | if(lt->arrange != swim) { | 180 | if(lt->arrange != versatile) { |
| 181 | if(!sel->swimming) | 181 | if(!sel->versatile) |
| 182 | XLowerWindow(dpy, sel->win); | 182 | XLowerWindow(dpy, sel->win); |
| 183 | for(c = nexttiled(clients); c; c = nexttiled(c->next)) { | 183 | for(c = nexttiled(clients); c; c = nexttiled(c->next)) { |
| 184 | if(c == sel) | 184 | if(c == sel) |
| @@ -208,7 +208,7 @@ settags(Client *c, Client *trans) { | |||
| 208 | ch.res_name ? ch.res_name : "", c->name); | 208 | ch.res_name ? ch.res_name : "", c->name); |
| 209 | for(i = 0; i < nrules; i++) | 209 | for(i = 0; i < nrules; i++) |
| 210 | if(regs[i].propregex && !regexec(regs[i].propregex, prop, 1, &tmp, 0)) { | 210 | if(regs[i].propregex && !regexec(regs[i].propregex, prop, 1, &tmp, 0)) { |
| 211 | c->swimming = rule[i].swimming; | 211 | c->versatile = rule[i].versatile; |
| 212 | for(j = 0; regs[i].tagregex && j < ntags; j++) { | 212 | for(j = 0; regs[i].tagregex && j < ntags; j++) { |
| 213 | if(!regexec(regs[i].tagregex, tags[j], 1, &tmp, 0)) { | 213 | if(!regexec(regs[i].tagregex, tags[j], 1, &tmp, 0)) { |
| 214 | matched = True; | 214 | matched = True; |
| @@ -227,29 +227,6 @@ settags(Client *c, Client *trans) { | |||
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | void | 229 | void |
| 230 | swim(void) { | ||
| 231 | Client *c; | ||
| 232 | |||
| 233 | for(c = clients; c; c = c->next) { | ||
| 234 | if(isvisible(c)) { | ||
| 235 | if(c->isbanned) | ||
| 236 | XMoveWindow(dpy, c->win, c->x, c->y); | ||
| 237 | c->isbanned = False; | ||
| 238 | resize(c, c->x, c->y, c->w, c->h, True); | ||
| 239 | } | ||
| 240 | else { | ||
| 241 | c->isbanned = True; | ||
| 242 | XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); | ||
| 243 | } | ||
| 244 | } | ||
| 245 | if(!sel || !isvisible(sel)) { | ||
| 246 | for(c = stack; c && !isvisible(c); c = c->snext); | ||
| 247 | focus(c); | ||
| 248 | } | ||
| 249 | restack(); | ||
| 250 | } | ||
| 251 | |||
| 252 | void | ||
| 253 | tag(Arg *arg) { | 230 | tag(Arg *arg) { |
| 254 | unsigned int i; | 231 | unsigned int i; |
| 255 | 232 | ||
| @@ -263,14 +240,6 @@ tag(Arg *arg) { | |||
| 263 | } | 240 | } |
| 264 | 241 | ||
| 265 | void | 242 | void |
| 266 | toggleswimming(Arg *arg) { | ||
| 267 | if(!sel || lt->arrange == swim) | ||
| 268 | return; | ||
| 269 | sel->swimming = !sel->swimming; | ||
| 270 | lt->arrange(); | ||
| 271 | } | ||
| 272 | |||
| 273 | void | ||
| 274 | toggletag(Arg *arg) { | 243 | toggletag(Arg *arg) { |
| 275 | unsigned int i; | 244 | unsigned int i; |
| 276 | 245 | ||
| @@ -299,6 +268,14 @@ togglelayout(Arg *arg) { | |||
| 299 | } | 268 | } |
| 300 | 269 | ||
| 301 | void | 270 | void |
| 271 | toggleversatile(Arg *arg) { | ||
| 272 | if(!sel || lt->arrange == versatile) | ||
| 273 | return; | ||
| 274 | sel->versatile = !sel->versatile; | ||
| 275 | lt->arrange(); | ||
| 276 | } | ||
| 277 | |||
| 278 | void | ||
| 302 | toggleview(Arg *arg) { | 279 | toggleview(Arg *arg) { |
| 303 | unsigned int i; | 280 | unsigned int i; |
| 304 | 281 | ||
| @@ -310,6 +287,29 @@ toggleview(Arg *arg) { | |||
| 310 | } | 287 | } |
| 311 | 288 | ||
| 312 | void | 289 | void |
| 290 | versatile(void) { | ||
| 291 | Client *c; | ||
| 292 | |||
| 293 | for(c = clients; c; c = c->next) { | ||
| 294 | if(isvisible(c)) { | ||
| 295 | if(c->isbanned) | ||
| 296 | XMoveWindow(dpy, c->win, c->x, c->y); | ||
| 297 | c->isbanned = False; | ||
| 298 | resize(c, c->x, c->y, c->w, c->h, True); | ||
| 299 | } | ||
| 300 | else { | ||
| 301 | c->isbanned = True; | ||
| 302 | XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); | ||
| 303 | } | ||
| 304 | } | ||
| 305 | if(!sel || !isvisible(sel)) { | ||
| 306 | for(c = stack; c && !isvisible(c); c = c->snext); | ||
| 307 | focus(c); | ||
| 308 | } | ||
| 309 | restack(); | ||
| 310 | } | ||
| 311 | |||
| 312 | void | ||
| 313 | view(Arg *arg) { | 313 | view(Arg *arg) { |
| 314 | unsigned int i; | 314 | unsigned int i; |
| 315 | 315 | ||
