Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.def.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static Key keys[] = {
{Mod1Mask, XK_F4, killclient, {0}},
{MODKEY, XK_F1, spawn, {.v = helpcmd}},
{MODKEY, XK_F2, toggleprefix, {0}},
{MODKEY, XK_t, setlayout, {.v = &layouts[0]}},
{MODKEY, XK_t, settcltilelayout, {.v = &layouts[0]}},
{MODKEY, XK_f, setlayout, {.v = &layouts[2]}},
{MODKEY, XK_m, setlayout, {.v = &layouts[3]}},
{MODKEY|ShiftMask, XK_m, movemouse, {0}},
Expand Down
9 changes: 9 additions & 0 deletions instantwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4092,6 +4092,15 @@ commandlayout(const Arg *arg) {
setlayout(larg);
}

void
settcltilelayout(const Arg *arg)
{
if (strcmp(selmon->lt[selmon->sellt]->symbol, layouts[0].symbol) != 0)
setlayout(arg);
else
setlayout(&((Arg) { .v = &layouts[4]}));
}

void
setlayout(const Arg *arg)
{
Expand Down
1 change: 1 addition & 0 deletions instantwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ int getxtag(int ix);
void setclientstate(Client *c, long state);
void setfocus(Client *c);
void setfullscreen(Client *c, int fullscreen);
void settcltilelayout(const Arg *arg);
void setlayout(const Arg *arg);
void commandlayout(const Arg *arg);
void commandprefix(const Arg *arg);
Expand Down