From bb2b54d1beebd61e089ffb2e2fda4f8571c91a37 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Fri, 3 Jun 2022 11:54:35 +0200 Subject: [PATCH] Fix monitor starting tab and disable swallow --- config.def.h | 7 ------- config.h | 7 ++++--- dwm.c | 4 +++- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/config.def.h b/config.def.h index 0e04b2c..57748f2 100644 --- a/config.def.h +++ b/config.def.h @@ -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) */ diff --git a/config.h b/config.h index 7787a7c..38ef78b 100644 --- a/config.h +++ b/config.h @@ -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 }; diff --git a/dwm.c b/dwm.c index 4311992..5631cfc 100644 --- a/dwm.c +++ b/dwm.c @@ -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<cl = cl; m->tagset[0] = m->tagset[1] = (1<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)