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