dwm

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

tagall.c (654B)


      1 void
      2 tagall(const Arg *arg)
      3 {
      4 	if (!selmon->clients)
      5 		return;
      6 	/* if parameter starts with F, just move floating windows */
      7 	int floating_only = (char *)arg->v && ((char *)arg->v)[0] == 'F' ? 1 : 0;
      8 	int tag = (char *)arg->v ? atoi(((char *)arg->v) + floating_only) : 0;
      9 	int j;
     10 	Client* c;
     11 	if (tag >= 0 && tag < NUMTAGS)
     12 		for (c = selmon->clients; c; c = c->next)
     13 		{
     14 			if (!floating_only || c->isfloating)
     15 				for (j = 0; j < NUMTAGS; j++)
     16 				{
     17 					if (c->tags & 1 << j && selmon->tagset[selmon->seltags] & 1 << j)
     18 					{
     19 						c->tags = c->tags ^ (1 << j & TAGMASK);
     20 						c->tags = c->tags | 1 << (tag-1);
     21 					}
     22 				}
     23 		}
     24 	arrange(selmon);
     25 }
     26