Fix monitor starting tab and disable swallow

This commit is contained in:
Zoe Roux
2022-06-03 11:54:35 +02:00
parent 19e1fe6378
commit bb2b54d1be
3 changed files with 7 additions and 11 deletions

View File

@@ -87,7 +87,6 @@ static const Rule rules[] = {
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
<<<<<<< HEAD
};
/* Bar rules allow you to configure what is shown where on the bar, as well as
@@ -114,17 +113,11 @@ static const BarRule barrules[] = {
static const MonitorRule monrules[] = {
/* monitor layout mfact nmaster showbar tagset */
{ -1, 0, -1, -1, -1, 0 }, // default
||||||| constructed merge base
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 1, -1 },
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
=======
/* class instance title tags mask isfloating isterminal noswallow monitor */
{ "Gimp", NULL, NULL, 0, 1, 0, 0, -1 },
{ "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 },
{ "St", NULL, NULL, 0, 0, 1, 0, -1 },
{ NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */
>>>>>>> fix swallow for openbsd
};
/* layout(s) */

View File

@@ -100,7 +100,7 @@ static const Rule rules[] = {
RULE(.type = WTYPE "TOOLBAR", .isfloating = 1)
RULE(.type = WTYPE "SPLASH", .isfloating = 1)
RULE(.class = "feh", .tags = 0)
RULE(.class = "kitty", .isterminal = 1)
RULE(.class = "kitty", .isterminal = 0) // isterminal at 0 to disable swallowing
RULE(.title = "Discord Updater", .tags = 1 << 4, .isfloating = 1, .matchonce = 1, .floatpos = "50% 50%")
RULE(.class = "discord", .tags = 1 << 4)
RULE(.class = "lutris", .isfloating = 1)
@@ -140,8 +140,9 @@ static const BarRule barrules[] = {
static const MonitorRule monrules[] = {
/* monitor layout mfact nmaster showbar tagset */
{ 1, 2, -1, -1, -1, 1 << 5 },
{ 2, 0, -1, -1, -1, 1 << 4 },
{ 0, 0, -1, -1, -1, 1 << 4 },
{ 1, 0, -1, -1, -1, 1 << 3 },
{ 2, 0, -1, -1, -1, 1 << 6 },
{ -1, 0, -1, -1, -1, 0 }, // default
};

4
dwm.c
View File

@@ -999,10 +999,12 @@ createmon(void)
/* reassign all tags to monitors since there's currently no free tag for the
* new monitor */
if (i >= LENGTH(tags))
{
for (i=0, tm=mons; tm; tm=tm->next, i++) {
tm->seltags ^= 1;
tm->tagset[tm->seltags] = (1<<i) & TAGMASK;
}
}
m = ecalloc(1, sizeof(Monitor));
m->cl = cl;
m->tagset[0] = m->tagset[1] = (1<<i) & TAGMASK;
@@ -1033,7 +1035,7 @@ createmon(void)
mr = &monrules[j];
if ((mr->monitor == -1 || mr->monitor == mi)) {
m->lt[0] = &layouts[mr->layout];
m->lt[1] = &layouts[1 % LENGTH(layouts)];
m->lt[1] = &layouts[2 % LENGTH(layouts)]; // The second layout is monocle by default.
strncpy(m->ltsymbol, layouts[mr->layout].symbol, sizeof m->ltsymbol);
if (mr->mfact > -1)