dwm

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

tagothermonitor.c (638B)


      1 #if IPC_PATCH || DWMC_PATCH
      2 void
      3 tagnextmonex(const Arg *arg)
      4 {
      5 	tagnextmon(&((Arg) { .ui = 1 << arg->ui }));
      6 }
      7 
      8 void
      9 tagprevmonex(const Arg *arg)
     10 {
     11 	tagprevmon(&((Arg) { .ui = 1 << arg->ui }));
     12 }
     13 #endif // IPC_PATCH | DWMC_PATCH
     14 
     15 void
     16 tagnextmon(const Arg *arg)
     17 {
     18 	tagothermon(arg, 1);
     19 }
     20 
     21 void
     22 tagprevmon(const Arg *arg)
     23 {
     24 	tagothermon(arg, -1);
     25 }
     26 
     27 void
     28 tagothermon(const Arg *arg, int dir)
     29 {
     30 	Client *sel;
     31 	Monitor *newmon;
     32 
     33 	if (!selmon->sel || !mons->next)
     34 		return;
     35 	sel = selmon->sel;
     36 	newmon = dirtomon(dir);
     37 	sendmon(sel, newmon);
     38 	if (arg->ui & TAGMASK) {
     39 		sel->tags = arg->ui & TAGMASK;
     40 		arrange(newmon);
     41 		focus(NULL);
     42 	}
     43 }
     44