From 69262b01ced79c2d776fab9b889926d1816a1e7a Mon Sep 17 00:00:00 2001 From: Bear Date: Mon, 27 Dec 2021 09:29:58 +0000 Subject: Added DWM --- patch/fullscreen.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 patch/fullscreen.c (limited to 'patch/fullscreen.c') diff --git a/patch/fullscreen.c b/patch/fullscreen.c new file mode 100644 index 0000000..667cdc9 --- /dev/null +++ b/patch/fullscreen.c @@ -0,0 +1,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); +} + -- cgit v1.2.1