~kris/suckless

dwm

ref: ecba1fc15a4e33ba4b00e04f8f047170019d7f2f dwm/patch/fullscreen.c -rw-r--r-- 550 bytes
ecba1fc1 — Kris Yotam enable FLEXTILE_DELUXE_LAYOUT for RRR reading mode (3 vertical panes) 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Layout *last_layout;

void
fullscreen(const Arg *arg)
{
	int monocle_pos = 0;
	if (selmon->showbar || last_layout == NULL) {
		#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
		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);
}