-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path02-dwm-shiftview.diff
35 lines (34 loc) · 1.01 KB
/
02-dwm-shiftview.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Seulement dans dwm-6.2_: 01-dwm-statuscolor.diff
diff -up dwm-6.2_/dwm.c dwm-6.2-patch/dwm.c
--- dwm-6.2_/dwm.c 2020-05-15 23:41:26.126427625 +0200
+++ dwm-6.2-patch/dwm.c 2020-05-15 23:40:30.023097363 +0200
@@ -205,6 +205,7 @@ static void setup(void);
static void seturgent(Client *c, int urg);
static void showhide(Client *c);
static void sigchld(int unused);
+static void shiftview(const Arg *arg);
static void spawn(const Arg *arg);
static void tag(const Arg *arg);
static void tagmon(const Arg *arg);
@@ -1664,6 +1665,22 @@ sigchld(int unused)
}
void
+shiftview(const Arg *arg)
+{
+ Arg shifted;
+
+ if(arg->i > 0) // left circular shift
+ shifted.ui = (selmon->tagset[selmon->seltags] << arg->i)
+ | (selmon->tagset[selmon->seltags] >> (LENGTH(tags) - arg->i));
+
+ else // right circular shift
+ shifted.ui = selmon->tagset[selmon->seltags] >> (- arg->i)
+ | selmon->tagset[selmon->seltags] << (LENGTH(tags) + arg->i);
+
+ view(&shifted);
+}
+
+void
spawn(const Arg *arg)
{
if (arg->v == dmenucmd)