dotfiles-mirror/dwm/patch/fullscreen.c

19 lines
550 B
C
Raw Normal View History

2025-07-29 04:42:29 +03:30
Layout *last_layout;
void
fullscreen(const Arg *arg)
{
int monocle_pos = 0;
if (selmon->showbar || last_layout == NULL) {
2026-02-05 03:05:24 +03:30
#if MONOCLE_LAYOUT
for (monocle_pos = 0, last_layout = (Layout *)layouts; !last_layout->arrange || last_layout->arrange != &monocle; monocle_pos++, last_layout++ );
#endif // MONOCLE_LAYOUT
2025-07-29 04:42:29 +03:30
for (last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++);
setlayout(&((Arg) { .v = &layouts[monocle_pos] }));
} else {
setlayout(&((Arg) { .v = last_layout }));
}
togglebar(arg);
}