diff options
| author | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-18 11:38:31 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-18 11:38:31 +0200 |
| commit | 4f8b08d330a6c377ab919f48b8e922d1c5ded601 (patch) | |
| tree | bcfed5668645ef87fd2b7c3ff0d757912169f016 | |
| parent | using EXIT_stuff in exit() now (diff) | |
| download | dwm-4f8b08d330a6c377ab919f48b8e922d1c5ded601.tar.gz dwm-4f8b08d330a6c377ab919f48b8e922d1c5ded601.zip | |
added heretag command which allows to tag a client of a foreign tag with current tag
Diffstat (limited to '')
| -rw-r--r-- | client.c | 8 | ||||
| -rw-r--r-- | draw.c | 2 | ||||
| -rw-r--r-- | dwm.1 | 8 | ||||
| -rw-r--r-- | dwm.h | 3 | ||||
| -rw-r--r-- | event.c | 4 | ||||
| -rw-r--r-- | tag.c | 27 |
6 files changed, 42 insertions, 10 deletions
| @@ -66,8 +66,8 @@ focusnext(Arg *arg) | |||
| 66 | if(!sel) | 66 | if(!sel) |
| 67 | return; | 67 | return; |
| 68 | 68 | ||
| 69 | if(!(c = getnext(sel->next))) | 69 | if(!(c = getnext(sel->next, tsel))) |
| 70 | c = getnext(clients); | 70 | c = getnext(clients, tsel); |
| 71 | if(c) { | 71 | if(c) { |
| 72 | higher(c); | 72 | higher(c); |
| 73 | c->revert = sel; | 73 | c->revert = sel; |
| @@ -410,8 +410,8 @@ zoom(Arg *arg) | |||
| 410 | if(!sel) | 410 | if(!sel) |
| 411 | return; | 411 | return; |
| 412 | 412 | ||
| 413 | if(sel == getnext(clients) && sel->next) { | 413 | if(sel == getnext(clients, tsel) && sel->next) { |
| 414 | if((c = getnext(sel->next))) | 414 | if((c = getnext(sel->next, tsel))) |
| 415 | sel = c; | 415 | sel = c; |
| 416 | } | 416 | } |
| 417 | 417 | ||
| @@ -97,7 +97,7 @@ drawall() | |||
| 97 | { | 97 | { |
| 98 | Client *c; | 98 | Client *c; |
| 99 | 99 | ||
| 100 | for(c = clients; c; c = getnext(c->next)) | 100 | for(c = clients; c; c = getnext(c->next, tsel)) |
| 101 | drawtitle(c); | 101 | drawtitle(c); |
| 102 | drawstatus(); | 102 | drawstatus(); |
| 103 | } | 103 | } |
| @@ -93,6 +93,14 @@ Append | |||
| 93 | tag to current | 93 | tag to current |
| 94 | .B window | 94 | .B window |
| 95 | .TP | 95 | .TP |
| 96 | .B Control-Shift-[0..n] | ||
| 97 | Replace current | ||
| 98 | .B window | ||
| 99 | of | ||
| 100 | .B nth | ||
| 101 | tag with current tag. | ||
| 102 | .B window | ||
| 103 | .TP | ||
| 96 | .B Control-Button1 | 104 | .B Control-Button1 |
| 97 | Zooms the clicked | 105 | Zooms the clicked |
| 98 | .B window | 106 | .B window |
| @@ -145,7 +145,8 @@ extern int xerror(Display *dsply, XErrorEvent *ee); | |||
| 145 | extern void appendtag(Arg *arg); | 145 | extern void appendtag(Arg *arg); |
| 146 | extern void dofloat(Arg *arg); | 146 | extern void dofloat(Arg *arg); |
| 147 | extern void dotile(Arg *arg); | 147 | extern void dotile(Arg *arg); |
| 148 | extern Client *getnext(Client *c); | 148 | extern Client *getnext(Client *c, unsigned int t); |
| 149 | extern void heretag(Arg *arg); | ||
| 149 | extern void replacetag(Arg *arg); | 150 | extern void replacetag(Arg *arg); |
| 150 | extern void settags(Client *c); | 151 | extern void settags(Client *c); |
| 151 | extern void view(Arg *arg); | 152 | extern void view(Arg *arg); |
| @@ -35,6 +35,10 @@ Key key[] = { | |||
| 35 | { Mod1Mask, XK_m, maximize, { 0 } }, | 35 | { Mod1Mask, XK_m, maximize, { 0 } }, |
| 36 | { Mod1Mask, XK_space, dotile, { 0 } }, | 36 | { Mod1Mask, XK_space, dotile, { 0 } }, |
| 37 | { Mod1Mask, XK_Return, zoom, { 0 } }, | 37 | { Mod1Mask, XK_Return, zoom, { 0 } }, |
| 38 | { ControlMask|ShiftMask,XK_0, heretag, { .i = Tscratch } }, | ||
| 39 | { ControlMask|ShiftMask,XK_1, heretag, { .i = Tdev } }, | ||
| 40 | { ControlMask|ShiftMask,XK_2, heretag, { .i = Twww } }, | ||
| 41 | { ControlMask|ShiftMask,XK_3, heretag, { .i = Twork } }, | ||
| 38 | { Mod1Mask|ShiftMask, XK_0, replacetag, { .i = Tscratch } }, | 42 | { Mod1Mask|ShiftMask, XK_0, replacetag, { .i = Tscratch } }, |
| 39 | { Mod1Mask|ShiftMask, XK_1, replacetag, { .i = Tdev } }, | 43 | { Mod1Mask|ShiftMask, XK_1, replacetag, { .i = Tdev } }, |
| 40 | { Mod1Mask|ShiftMask, XK_2, replacetag, { .i = Twww } }, | 44 | { Mod1Mask|ShiftMask, XK_2, replacetag, { .i = Twww } }, |
| @@ -49,7 +49,7 @@ dofloat(Arg *arg) | |||
| 49 | ban(c); | 49 | ban(c); |
| 50 | } | 50 | } |
| 51 | if(sel && !sel->tags[tsel]) { | 51 | if(sel && !sel->tags[tsel]) { |
| 52 | if((sel = getnext(clients))) { | 52 | if((sel = getnext(clients, tsel))) { |
| 53 | higher(sel); | 53 | higher(sel); |
| 54 | focus(sel); | 54 | focus(sel); |
| 55 | } | 55 | } |
| @@ -106,7 +106,7 @@ dotile(Arg *arg) | |||
| 106 | ban(c); | 106 | ban(c); |
| 107 | } | 107 | } |
| 108 | if(!sel || (sel && !sel->tags[tsel])) { | 108 | if(!sel || (sel && !sel->tags[tsel])) { |
| 109 | if((sel = getnext(clients))) { | 109 | if((sel = getnext(clients, tsel))) { |
| 110 | higher(sel); | 110 | higher(sel); |
| 111 | focus(sel); | 111 | focus(sel); |
| 112 | } | 112 | } |
| @@ -115,13 +115,32 @@ dotile(Arg *arg) | |||
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | Client * | 117 | Client * |
| 118 | getnext(Client *c) | 118 | getnext(Client *c, unsigned int t) |
| 119 | { | 119 | { |
| 120 | for(; c && !c->tags[tsel]; c = c->next); | 120 | for(; c && !c->tags[t]; c = c->next); |
| 121 | return c; | 121 | return c; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | void | 124 | void |
| 125 | heretag(Arg *arg) | ||
| 126 | { | ||
| 127 | int i; | ||
| 128 | Client *c; | ||
| 129 | |||
| 130 | if(arg->i == tsel) | ||
| 131 | return; | ||
| 132 | |||
| 133 | if(!(c = getnext(clients, arg->i))) | ||
| 134 | return; | ||
| 135 | |||
| 136 | for(i = 0; i < TLast; i++) | ||
| 137 | c->tags[i] = NULL; | ||
| 138 | c->tags[tsel] = tags[tsel]; | ||
| 139 | arrange(NULL); | ||
| 140 | focus(c); | ||
| 141 | } | ||
| 142 | |||
| 143 | void | ||
| 125 | replacetag(Arg *arg) | 144 | replacetag(Arg *arg) |
| 126 | { | 145 | { |
| 127 | int i; | 146 | int i; |
