mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 17:03:56 -05:00
switched to dwm
This commit is contained in:
parent
f543cd8e23
commit
20b8b3c80d
39 changed files with 8298 additions and 0 deletions
44
suckless/dwm-patches/2-fullscreen.diff
Normal file
44
suckless/dwm-patches/2-fullscreen.diff
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
diff --git a/config.def.h b/config.def.h
|
||||
index 7dd19b6..70f1d52 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -80,6 +80,7 @@ static const Key keys[] = {
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
+ { MODKEY, XK_f, fullscreen, {0} },
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index e9e3934..f125a4d 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -205,6 +205,7 @@ static void sendmon(Client *c, Monitor *m);
|
||||
static void setclientstate(Client *c, long state);
|
||||
static void setfocus(Client *c);
|
||||
static void setfullscreen(Client *c, int fullscreen);
|
||||
+static void fullscreen(const Arg *arg);
|
||||
static void setgaps(const Arg *arg);
|
||||
static void setlayout(const Arg *arg);
|
||||
static void setmfact(const Arg *arg);
|
||||
@@ -1546,6 +1547,19 @@ setgaps(const Arg *arg)
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
+Layout *last_layout;
|
||||
+void
|
||||
+fullscreen(const Arg *arg)
|
||||
+{
|
||||
+ if (selmon->showbar) {
|
||||
+ for(last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++);
|
||||
+ setlayout(&((Arg) { .v = &layouts[2] }));
|
||||
+ } else {
|
||||
+ setlayout(&((Arg) { .v = last_layout }));
|
||||
+ }
|
||||
+ togglebar(arg);
|
||||
+}
|
||||
+
|
||||
void
|
||||
setlayout(const Arg *arg)
|
||||
{
|
||||
Loading…
Add table
Add a link
Reference in a new issue