mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
Adding shiftviewclients files
This commit is contained in:
parent
91291ceb9f
commit
a6c2fe5668
24
patch/shiftviewclients.c
Normal file
24
patch/shiftviewclients.c
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
void
|
||||||
|
shiftviewclients(const Arg *arg)
|
||||||
|
{
|
||||||
|
Arg shifted;
|
||||||
|
Client *c;
|
||||||
|
unsigned int tagmask = 0;
|
||||||
|
|
||||||
|
for (c = selmon->clients; c; c = c->next)
|
||||||
|
tagmask = tagmask | c->tags;
|
||||||
|
|
||||||
|
shifted.ui = selmon->tagset[selmon->seltags];
|
||||||
|
if (arg->i > 0) // left circular shift
|
||||||
|
do {
|
||||||
|
shifted.ui = (shifted.ui << arg->i)
|
||||||
|
| (shifted.ui >> (LENGTH(tags) - arg->i));
|
||||||
|
} while (tagmask && !(shifted.ui & tagmask));
|
||||||
|
else // right circular shift
|
||||||
|
do {
|
||||||
|
shifted.ui = (shifted.ui >> (- arg->i)
|
||||||
|
| shifted.ui << (LENGTH(tags) + arg->i));
|
||||||
|
} while (tagmask && !(shifted.ui & tagmask));
|
||||||
|
|
||||||
|
view(&shifted);
|
||||||
|
}
|
1
patch/shiftviewclients.h
Normal file
1
patch/shiftviewclients.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
static void shiftviewclients(const Arg *arg);
|
Loading…
x
Reference in New Issue
Block a user