2019-10-02 23:57:25 +02:00
|
|
|
void
|
|
|
|
tagtoleft(const Arg *arg)
|
|
|
|
{
|
2022-02-20 13:24:52 +01:00
|
|
|
unsigned int MASK = (1 << NUMTAGS) - 1;
|
2019-10-02 23:57:25 +02:00
|
|
|
if (selmon->sel != NULL
|
2022-02-20 13:24:52 +01:00
|
|
|
&& __builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
2019-10-02 23:57:25 +02:00
|
|
|
&& selmon->tagset[selmon->seltags] > 1) {
|
|
|
|
selmon->sel->tags >>= 1;
|
|
|
|
focus(NULL);
|
|
|
|
arrange(selmon);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
tagtoright(const Arg *arg)
|
|
|
|
{
|
2022-02-20 13:24:52 +01:00
|
|
|
unsigned int MASK = (1 << NUMTAGS) - 1;
|
2019-10-02 23:57:25 +02:00
|
|
|
if (selmon->sel != NULL
|
2022-02-20 13:24:52 +01:00
|
|
|
&& __builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
|
|
|
&& selmon->tagset[selmon->seltags] & (MASK >> 1)) {
|
2019-10-02 23:57:25 +02:00
|
|
|
selmon->sel->tags <<= 1;
|
|
|
|
focus(NULL);
|
|
|
|
arrange(selmon);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
viewtoleft(const Arg *arg)
|
|
|
|
{
|
2022-02-20 13:24:52 +01:00
|
|
|
unsigned int MASK = (1 << NUMTAGS) - 1;
|
|
|
|
if (__builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
2019-10-02 23:57:25 +02:00
|
|
|
&& selmon->tagset[selmon->seltags] > 1) {
|
2022-02-11 16:57:53 +01:00
|
|
|
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] >> 1 }));
|
2019-10-02 23:57:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
viewtoright(const Arg *arg)
|
|
|
|
{
|
2022-02-20 13:24:52 +01:00
|
|
|
unsigned int MASK = (1 << NUMTAGS) - 1;
|
|
|
|
if (__builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
|
|
|
&& selmon->tagset[selmon->seltags] & (MASK >> 1)) {
|
2022-02-11 16:57:53 +01:00
|
|
|
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] << 1 }));
|
2019-10-02 23:57:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
tagandviewtoleft(const Arg *arg)
|
|
|
|
{
|
2022-02-20 13:24:52 +01:00
|
|
|
unsigned int MASK = (1 << NUMTAGS) - 1;
|
2021-10-20 08:59:47 +02:00
|
|
|
if (selmon->sel != NULL
|
2022-02-20 13:24:52 +01:00
|
|
|
&& __builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
2019-10-02 23:57:25 +02:00
|
|
|
&& selmon->tagset[selmon->seltags] > 1) {
|
|
|
|
selmon->sel->tags >>= 1;
|
2022-02-11 16:57:53 +01:00
|
|
|
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] >> 1 }));
|
2019-10-02 23:57:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
tagandviewtoright(const Arg *arg)
|
|
|
|
{
|
2022-02-20 13:24:52 +01:00
|
|
|
unsigned int MASK = (1 << NUMTAGS) - 1;
|
2021-10-20 08:59:47 +02:00
|
|
|
if (selmon->sel != NULL
|
2022-02-20 13:24:52 +01:00
|
|
|
&& __builtin_popcount(selmon->tagset[selmon->seltags] & MASK) == 1
|
|
|
|
&& selmon->tagset[selmon->seltags] & (MASK >> 1)) {
|
2019-10-02 23:57:25 +02:00
|
|
|
selmon->sel->tags <<= 1;
|
2022-02-11 16:57:53 +01:00
|
|
|
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] << 1 }));
|
2019-10-02 23:57:25 +02:00
|
|
|
}
|
2021-06-14 07:16:17 +02:00
|
|
|
}
|