$MODKEY-space is toggle between floating and managed mode, $MODKEY-Shift-space is 'sendto toggle'

This commit is contained in:
Anselm R. Garbe 2006-03-11 20:37:29 +01:00
parent 32e9238c9a
commit f4db0019b2
3 changed files with 14 additions and 3 deletions

View File

@ -73,7 +73,12 @@ select_area(Area *a, char *arg)
int i = area2index(a);
if(i == -1)
return;
if(!strncmp(arg, "prev", 5)) {
if(!strncmp(arg, "toggle", 7)) {
if(i)
i = 0;
else
i = 1;
} else if(!strncmp(arg, "prev", 5)) {
if(i == 1)
i = t->narea - 1;
else if(i != 0)

View File

@ -510,6 +510,12 @@ send2area_client(Client *c, char *arg)
else
to = t->area[1];
}
else if(!strncmp(arg, "toggle", 7)) {
if(i)
to = t->area[0];
else
to = t->area[1];
}
else {
i = cext_strtonum(arg, 0, t->narea - 1, &errstr);
if(errstr)

View File

@ -143,9 +143,9 @@ do
$MODKEY-Shift-Return)
xwrite /ws/sel/sel/ctl sendto next;;
$MODKEY-space)
xwrite /ws/sel/sel/ctl sendto 0;;
xwrite /ws/sel/ctl select toggle;;
$MODKEY-Shift-space)
xwrite /ws/sel/sel/ctl sendto 1;;
xwrite /ws/sel/sel/ctl sendto toggle;;
$MODKEY-h)
xwrite /ws/ctl select prev;;
$MODKEY-l)