dwm

Kris's build of dwm
git clone git clone https://git.krisyotam.com/krisyotam/dwm.git
Log | Files | Refs | README | LICENSE

combo.c (642B)


      1 static int combo = 0;
      2 
      3 #if !BAR_HOLDBAR_PATCH
      4 void
      5 keyrelease(XEvent *e)
      6 {
      7 	combo = 0;
      8 }
      9 #endif // !BAR_HOLDBAR_PATCH
     10 
     11 void
     12 combotag(const Arg *arg)
     13 {
     14 	if (selmon->sel && arg->ui & TAGMASK) {
     15 		#if SWITCHTAG_PATCH
     16 		if (selmon->sel->switchtag)
     17 			selmon->sel->switchtag = 0;
     18 		#endif // SWITCHTAG_PATCH
     19 		if (combo) {
     20 			selmon->sel->tags |= arg->ui & TAGMASK;
     21 		} else {
     22 			combo = 1;
     23 			selmon->sel->tags = arg->ui & TAGMASK;
     24 		}
     25 		arrange(selmon);
     26 		focus(NULL);
     27 	}
     28 }
     29 
     30 void
     31 comboview(const Arg *arg)
     32 {
     33 	if (combo) {
     34 		view(&((Arg) { .ui = selmon->tagset[selmon->seltags] | (arg->ui & TAGMASK) }));
     35 	} else {
     36 		combo = 1;
     37 		view(arg);
     38 	}
     39 }