summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarg@mig29 <unknown>2006-11-30 15:27:43 +0100
committerarg@mig29 <unknown>2006-11-30 15:27:43 +0100
commit42fd392e05d54db441ecbf534cfd67d20473aac0 (patch)
tree9ad572a816dc6605e2a52f9d5dd720ec645ed56c
parente06447ee88154a4acdde518299a32b083e3fbcba (diff)
downloaddwm-42fd392e05d54db441ecbf534cfd67d20473aac0.tar.gz
removed viewall(), replaced with view(-1); added tag(-1) to tag a client with all tags (new key combo MODKEY-Shift-0)
-rw-r--r--config.arg.h3
-rw-r--r--config.default.h3
-rw-r--r--dwm.13
-rw-r--r--tag.c2
-rw-r--r--view.c11
5 files changed, 9 insertions, 13 deletions
diff --git a/config.arg.h b/config.arg.h
index ee63eb1..7c05dcb 100644
--- a/config.arg.h
+++ b/config.arg.h
@@ -35,6 +35,7 @@ static Key key[] = { \
{ MODKEY, XK_Return, zoom, { 0 } }, \
{ MODKEY, XK_g, resizemaster, { .i = 15 } }, \
{ MODKEY, XK_s, resizemaster, { .i = -15 } }, \
+ { MODKEY|ShiftMask, XK_0, tag, { .i = -1 } }, \
{ MODKEY|ShiftMask, XK_1, tag, { .i = 0 } }, \
{ MODKEY|ShiftMask, XK_2, tag, { .i = 1 } }, \
{ MODKEY|ShiftMask, XK_3, tag, { .i = 2 } }, \
@@ -46,7 +47,7 @@ static Key key[] = { \
{ MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \
{ MODKEY, XK_space, togglemode, { 0 } }, \
{ MODKEY|ShiftMask, XK_space, togglefloat, { 0 } }, \
- { MODKEY, XK_0, viewall, { 0 } }, \
+ { MODKEY, XK_0, view, { .i = -1 } }, \
{ MODKEY, XK_1, view, { .i = 0 } }, \
{ MODKEY, XK_2, view, { .i = 1 } }, \
{ MODKEY, XK_3, view, { .i = 2 } }, \
diff --git a/config.default.h b/config.default.h
index 077c337..091b52e 100644
--- a/config.default.h
+++ b/config.default.h
@@ -30,6 +30,7 @@ static Key key[] = { \
{ MODKEY, XK_Return, zoom, { 0 } }, \
{ MODKEY, XK_g, resizemaster, { .i = 15 } }, \
{ MODKEY, XK_s, resizemaster, { .i = -15 } }, \
+ { MODKEY|ShiftMask, XK_0, tag, { .i = -1 } }, \
{ MODKEY|ShiftMask, XK_1, tag, { .i = 0 } }, \
{ MODKEY|ShiftMask, XK_2, tag, { .i = 1 } }, \
{ MODKEY|ShiftMask, XK_3, tag, { .i = 2 } }, \
@@ -43,7 +44,7 @@ static Key key[] = { \
{ MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \
{ MODKEY, XK_space, togglemode, { 0 } }, \
{ MODKEY|ShiftMask, XK_space, togglefloat, { 0 } }, \
- { MODKEY, XK_0, viewall, { 0 } }, \
+ { MODKEY, XK_0, view, { .i = -1 } }, \
{ MODKEY, XK_1, view, { .i = 0 } }, \
{ MODKEY, XK_2, view, { .i = 1 } }, \
{ MODKEY, XK_3, view, { .i = 2 } }, \
diff --git a/dwm.1 b/dwm.1
index 298585e..19e881f 100644
--- a/dwm.1
+++ b/dwm.1
@@ -75,6 +75,9 @@ Apply
.RB nth
tag to current window.
.TP
+.B Mod1-Shift-0
+Apply all tags to current window.
+.TP
.B Mod1-Control-Shift-[1..n]
Add/remove
.B nth
diff --git a/tag.c b/tag.c
index b1a2eb9..20a0a17 100644
--- a/tag.c
+++ b/tag.c
@@ -113,7 +113,7 @@ tag(Arg *arg) {
if(!sel)
return;
for(i = 0; i < ntags; i++)
- sel->tags[i] = False;
+ sel->tags[i] = (arg->i == -1) ? True : False;
sel->tags[arg->i] = True;
arrange();
}
diff --git a/view.c b/view.c
index c11e349..14cfc1d 100644
--- a/view.c
+++ b/view.c
@@ -233,21 +233,12 @@ view(Arg *arg) {
unsigned int i;
for(i = 0; i < ntags; i++)
- seltag[i] = False;
+ seltag[i] = (arg->i == -1) ? True : False;
seltag[arg->i] = True;
arrange();
}
void
-viewall(Arg *arg) {
- unsigned int i;
-
- for(i = 0; i < ntags; i++)
- seltag[i] = True;
- arrange();
-}
-
-void
zoom(Arg *arg) {
unsigned int n;
Client *c;