2019-09-11 23:35:43 +02:00
|
|
|
static int combo = 0;
|
|
|
|
|
2020-07-15 08:57:30 +02:00
|
|
|
#if !BAR_HOLDBAR_PATCH
|
2019-09-11 23:35:43 +02:00
|
|
|
void
|
2019-09-30 23:52:51 +02:00
|
|
|
keyrelease(XEvent *e)
|
|
|
|
{
|
2019-09-11 23:35:43 +02:00
|
|
|
combo = 0;
|
|
|
|
}
|
2020-07-15 08:57:30 +02:00
|
|
|
#endif // !BAR_HOLDBAR_PATCH
|
2019-09-11 23:35:43 +02:00
|
|
|
|
|
|
|
void
|
2019-09-30 23:52:51 +02:00
|
|
|
combotag(const Arg *arg)
|
|
|
|
{
|
|
|
|
if (selmon->sel && arg->ui & TAGMASK) {
|
2020-05-20 15:25:56 +02:00
|
|
|
#if SWITCHTAG_PATCH
|
|
|
|
if (selmon->sel->switchtag)
|
|
|
|
selmon->sel->switchtag = 0;
|
|
|
|
#endif // SWITCHTAG_PATCH
|
2019-09-11 23:35:43 +02:00
|
|
|
if (combo) {
|
|
|
|
selmon->sel->tags |= arg->ui & TAGMASK;
|
|
|
|
} else {
|
|
|
|
combo = 1;
|
|
|
|
selmon->sel->tags = arg->ui & TAGMASK;
|
|
|
|
}
|
|
|
|
focus(NULL);
|
|
|
|
arrange(selmon);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2019-09-30 23:52:51 +02:00
|
|
|
comboview(const Arg *arg)
|
|
|
|
{
|
2019-09-11 23:35:43 +02:00
|
|
|
unsigned newtags = arg->ui & TAGMASK;
|
|
|
|
if (combo) {
|
|
|
|
selmon->tagset[selmon->seltags] |= newtags;
|
|
|
|
} else {
|
|
|
|
selmon->seltags ^= 1; /*toggle tagset*/
|
|
|
|
combo = 1;
|
2019-09-30 23:52:51 +02:00
|
|
|
if (newtags) {
|
|
|
|
#if PERTAG_PATCH
|
|
|
|
pertagview(&((Arg) { .ui = newtags }));
|
|
|
|
#else
|
2019-09-11 23:35:43 +02:00
|
|
|
selmon->tagset[selmon->seltags] = newtags;
|
2019-09-30 23:52:51 +02:00
|
|
|
#endif // PERTAG_PATCH
|
|
|
|
}
|
2019-09-11 23:35:43 +02:00
|
|
|
}
|
|
|
|
focus(NULL);
|
|
|
|
arrange(selmon);
|
2021-06-14 07:16:17 +02:00
|
|
|
}
|
|
|
|
|