You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dwm-flexipatch/patch/combo.c

35 lines
602 B
C

static int combo = 0;
void
keyrelease(XEvent *e) {
combo = 0;
}
void
combotag(const Arg *arg) {
if(selmon->sel && arg->ui & TAGMASK) {
if (combo) {
selmon->sel->tags |= arg->ui & TAGMASK;
} else {
combo = 1;
selmon->sel->tags = arg->ui & TAGMASK;
}
focus(NULL);
arrange(selmon);
}
}
void
comboview(const Arg *arg) {
unsigned newtags = arg->ui & TAGMASK;
if (combo) {
selmon->tagset[selmon->seltags] |= newtags;
} else {
selmon->seltags ^= 1; /*toggle tagset*/
combo = 1;
if (newtags)
selmon->tagset[selmon->seltags] = newtags;
}
focus(NULL);
arrange(selmon);
}