From 3b1738cd485b300dbe4a1dbe3091dd3b4f8f1bee Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sat, 22 Jul 2023 02:24:36 +0300 Subject: [PATCH] add dwm-actualfullscreen --- config/dwm/config.def.h | 3 ++- config/dwm/dwm.c | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/config/dwm/config.def.h b/config/dwm/config.def.h index 87c9d7df..bbd0fea0 100644 --- a/config/dwm/config.def.h +++ b/config/dwm/config.def.h @@ -2,7 +2,7 @@ /* appearance */ static const unsigned int borderpx = 2; /* border pixel of windows */ -static const unsigned int gappx = 5; /* gaps between windows */ +static const unsigned int gappx = 10; /* gaps between windows */ static const unsigned int snap = 32; /* snap pixel */ static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */ @@ -97,6 +97,7 @@ static const Key keys[] = { { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_p, setlayout, {0} }, { MODKEY|ShiftMask, XK_p, togglefloating, {0} }, ++ { MODKEY|ShiftMask, XK_f, togglefullscr, {0} }, { MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY, XK_comma, focusmon, {.i = -1 } }, { MODKEY, XK_period, focusmon, {.i = +1 } }, diff --git a/config/dwm/dwm.c b/config/dwm/dwm.c index 1bf4fa21..e2111741 100644 --- a/config/dwm/dwm.c +++ b/config/dwm/dwm.c @@ -239,6 +239,7 @@ static void tagmon(const Arg *arg); static void tile(Monitor *m); static void togglebar(const Arg *arg); static void togglefloating(const Arg *arg); +static void togglefullscr(const Arg *arg); static void toggletag(const Arg *arg); static void toggleview(const Arg *arg); static void unfocus(Client *c, int setfocus); @@ -2012,6 +2013,13 @@ togglefloating(const Arg *arg) arrange(selmon); } +void +togglefullscr(const Arg *arg) +{ + if(selmon->sel) + setfullscreen(selmon->sel, !selmon->sel->isfullscreen); +} + void toggletag(const Arg *arg) {