diff options
author | Philip Wittamore <philip@wittamore.com> | 2025-05-07 21:37:02 +0200 |
---|---|---|
committer | Philip Wittamore <philip@wittamore.com> | 2025-05-07 21:37:02 +0200 |
commit | f5f17d168b2adcb87ff7595820a97f3b84fd8f52 (patch) | |
tree | cde2eb6bf90a15795e3c34e2ba4d53cfe289efce /dwm.c | |
parent | 584abc4f96590297909cb90727d793e405abbb6a (diff) | |
download | dwm-f5f17d168b2adcb87ff7595820a97f3b84fd8f52.tar.gz dwm-f5f17d168b2adcb87ff7595820a97f3b84fd8f52.tar.bz2 dwm-f5f17d168b2adcb87ff7595820a97f3b84fd8f52.zip |
pywal16, tag circulation, and French keyboard
Diffstat (limited to 'dwm.c')
-rw-r--r-- | dwm.c | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -58,7 +58,7 @@ /* enums */ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ -enum { SchemeNorm, SchemeSel }; /* color schemes */ +enum { SchemeNorm, SchemeSel, SchemeWarn, SchemeUrgent }; /* color schemes */ enum { NetSupported, NetWMName, NetWMState, NetWMCheck, NetWMFullscreen, NetActiveWindow, NetWMWindowType, NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ @@ -232,6 +232,7 @@ static int xerror(Display *dpy, XErrorEvent *ee); static int xerrordummy(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee); static void zoom(const Arg *arg); +static void view_adjacent(const Arg *arg); /* variables */ static const char broken[] = "broken"; @@ -2139,6 +2140,28 @@ zoom(const Arg *arg) pop(c); } +void +view_adjacent(const Arg *arg) +{ + int i, curtags; + int seltag = 0; + Arg a; + + curtags = selmon->tagset[selmon->seltags]; + for(i = 0; i < LENGTH(tags); i++) + if(curtags & (1 << i)){ + seltag = i; + break; + } + + seltag = (seltag + arg->i) % (int)LENGTH(tags); + if(seltag < 0) + seltag += LENGTH(tags); + + a.i = (1 << seltag); + view(&a); +} + int main(int argc, char *argv[]) { |