diff options
| author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-15 16:11:33 +0100 | 
|---|---|---|
| committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-15 16:11:33 +0100 | 
| commit | 419638a2730fbf1e2dc33b1119f8d1f30f112902 (patch) | |
| tree | 38a16e5de29c0816bc60479b9801bd0a7ce72783 | |
| parent | Keys update (diff) | |
| download | dwm-419638a2730fbf1e2dc33b1119f8d1f30f112902.tar.gz dwm-419638a2730fbf1e2dc33b1119f8d1f30f112902.tar.bz2 dwm-419638a2730fbf1e2dc33b1119f8d1f30f112902.tar.xz dwm-419638a2730fbf1e2dc33b1119f8d1f30f112902.tar.zst dwm-419638a2730fbf1e2dc33b1119f8d1f30f112902.zip  | |
Added switchtotag patch
Diffstat (limited to '')
| -rw-r--r-- | README | 1 | ||||
| -rw-r--r-- | README.org | 1 | ||||
| -rw-r--r-- | config.h | 14 | ||||
| -rw-r--r-- | dwm.c | 11 | 
4 files changed, 20 insertions, 7 deletions
@@ -66,6 +66,7 @@ List of patches in use:   - pertag   - restartsig   - sizehints + - switchtotag   - tagothermon  My own autostart script can be found under my dotfiles-bsd repository: @@ -63,6 +63,7 @@ List of patches in use:  - /pertag/  - /restartsig/  - /sizehints/ +- /switchtotag/  - /tagothermon/  My own autostart script can be found under my @@ -33,12 +33,13 @@ static const Rule rules[] = {  	 *	WM_CLASS(STRING) = instance, class  	 *	WM_NAME(STRING) = title  	 */ -	/* class         instance  title             tags mask  isfloating isfreesize monitor */ -	{ "Firefox",     NULL,     NULL,             1 << 2,    0,         0,         -1 }, -	{ "st-256color", NULL,     NULL,             0,         0,         0,         -1 }, -	{ "mpv",         NULL,     NULL,             0,         0,         0,         -1 }, -	{ NULL,          NULL,     "DergodsRealmII", 0,         1,         0,         -1 }, -	{ NULL,          NULL,     "Event Tester",   0,         0,         0,         -1 }, /* xev */ +	/* class         instance  title             tags mask  switchtotag   isfloating isfreesize monitor */ +	{ "Firefox",     NULL,     NULL,             1 << 2,    1,            0,         0,         -1 }, +	{ "Gimp",        NULL,     NULL,             1 << 3,    1,            0,         0,         -1 }, +	{ "st-256color", NULL,     NULL,             0,         0,            0,         0,         -1 }, +	{ "mpv",         NULL,     NULL,             0,         0,            0,         0,         -1 }, +	{ NULL,          NULL,     "DergodsRealmII", 0,         0,            1,         0,         -1 }, +	{ NULL,          NULL,     "Event Tester",   0,         0,            0,         0,         -1 }, /* xev */  };  /* layout(s) */ @@ -98,7 +99,6 @@ static Key keys[] = {  	{ MODKEY,                       XK_1,                     spawn,          {.v = vifmcmd } },  	{ MODKEY,                       XK_2,                     spawn,          {.v = nvimcmd } },  	{ MODKEY,                       XK_3,                     spawn,          {.v = ffcmd } }, -	TAGKEYS(                        XK_3,                                     2)  	{ MODKEY,                       XK_4,                     spawn,          {.v = w3mcmd } },  	{ MODKEY,                       XK_BackSpace,             spawn,          {.v = dmpccmd } },  	{ 0,                            XF86XK_MonBrightnessUp,   spawn,          {.v = blinccmd } }, @@ -93,6 +93,7 @@ struct Client {  	int basew, baseh, incw, inch, maxw, maxh, minw, minh;  	int bw, oldbw;  	unsigned int tags; +	unsigned int switchtotag;  	int isfixed, isfloating, isfreesize, isurgent, neverfocus, oldstate, isfullscreen;  	Client *next;  	Client *snext; @@ -140,6 +141,7 @@ typedef struct {  	const char *instance;  	const char *title;  	unsigned int tags; +	unsigned int switchtotag;  	int isfloating;  	int isfreesize;  	int monitor; @@ -353,6 +355,11 @@ applyrules(Client *c)  			for (m = mons; m && m->num != r->monitor; m = m->next);  			if (m)  				c->mon = m; +			if (r->switchtotag) { +				Arg a = { .ui = r->tags }; +				c->switchtotag = selmon->tagset[selmon->seltags]; +				view(&a); +			}  		}  	}  	if (ch.res_class) @@ -2103,6 +2110,10 @@ unmanage(Client *c, int destroyed)  	focus(NULL);  	updateclientlist();  	arrange(m); +	if (c->switchtotag) { +		Arg a = { .ui = c->switchtotag }; +		view(&a); +	}  }  void  | 
