Configure Three Column Layout

This commit is contained in:
Przemek Grondek 2023-03-19 17:26:46 +01:00
parent 02dfb51d07
commit a44e464824
2 changed files with 4 additions and 2 deletions

View File

@ -75,10 +75,12 @@ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen win
static const Layout layouts[] = { static const Layout layouts[] = {
/* symbol arrange function */ /* symbol arrange function */
{ "[]=", tile }, /* first entry is default */ { "[]=", tile }, /* first entry is default */
{ "|||", col }, { "=|=", tcl}, /* three columns layout */
{ "|||", col }, /* column layout */
{ "><>", NULL }, /* no layout function means floating behavior */ { "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle }, { "[M]", monocle },
}; };
static const Layout* monocleLayout = &layouts[4];
/* key definitions */ /* key definitions */
#define MODKEY Mod4Mask #define MODKEY Mod4Mask

2
dwm.c
View File

@ -1829,7 +1829,7 @@ fullscreen(const Arg *arg)
{ {
if (selmon->showbar) { if (selmon->showbar) {
for(last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++); for(last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++);
setlayout(&((Arg) { .v = &layouts[3] })); setlayout(&((Arg) { .v = &monocleLayout }));
} else { } else {
setlayout(&((Arg) { .v = last_layout })); setlayout(&((Arg) { .v = last_layout }));
} }