master
1diff --git a/dwm.c b/dwm.c
2index ff7e096..7b7456f 100644
3--- a/dwm.c
4+++ b/dwm.c
5@@ -203,6 +203,7 @@ static void setfullscreen(Client *c, int fullscreen);
6 static void setlayout(const Arg *arg);
7 static void setmfact(const Arg *arg);
8 static void setup(void);
9+static void shiftview(const Arg *arg);
10 static void showhide(Client *c);
11 static void sigchld(int unused);
12 static void spawn(const Arg *arg);
13@@ -1609,6 +1610,21 @@ setup(void)
14 }
15
16 void
17+shiftview(const Arg *arg) {
18+ Arg shifted;
19+
20+ if(arg->i > 0) // left circular shift
21+ shifted.ui = (selmon->tagset[selmon->seltags] << arg->i)
22+ | (selmon->tagset[selmon->seltags] >> (LENGTH(tags) - arg->i));
23+
24+ else // right circular shift
25+ shifted.ui = selmon->tagset[selmon->seltags] >> (- arg->i)
26+ | selmon->tagset[selmon->seltags] << (LENGTH(tags) + arg->i);
27+
28+ view(&shifted);
29+}
30+
31+void
32 showhide(Client *c)
33 {
34 if (!c)