2019-10-06 21:43:51 +00:00
|
|
|
Layout *last_layout;
|
2019-10-01 22:03:21 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
fullscreen(const Arg *arg)
|
|
|
|
{
|
2020-09-09 15:24:02 +00:00
|
|
|
int monocle_pos = 0;
|
2019-10-06 21:43:51 +00:00
|
|
|
if (selmon->showbar || last_layout == NULL) {
|
2020-09-09 15:24:02 +00:00
|
|
|
#if MONOCLE_LAYOUT
|
2020-08-27 04:26:48 +00:00
|
|
|
for (monocle_pos = 0, last_layout = (Layout *)layouts; !last_layout->arrange || last_layout->arrange != &monocle; monocle_pos++, last_layout++ );
|
2020-09-09 15:24:02 +00:00
|
|
|
#endif // MONOCLE_LAYOUT
|
2019-10-01 22:03:21 +00:00
|
|
|
for (last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++);
|
2020-08-27 04:26:48 +00:00
|
|
|
setlayout(&((Arg) { .v = &layouts[monocle_pos] }));
|
2019-10-01 22:03:21 +00:00
|
|
|
} else {
|
|
|
|
setlayout(&((Arg) { .v = last_layout }));
|
|
|
|
}
|
|
|
|
togglebar(arg);
|
2021-06-14 05:16:17 +00:00
|
|
|
}
|
|
|
|
|