summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsxv478 <vt0451@yandex.ru>2023-02-14 17:45:37 +0300
committertsxv478 <vt0451@yandex.ru>2023-02-14 17:45:37 +0300
commit36d9bb1c4a16654fb6223b4e350d06660f7a1062 (patch)
tree01430b200c7f1931b9b8fe0741c92c14ffa9fb3a
parentfb5c73335f08eb8a908351fbba6888e72ac7326a (diff)
actual fullscreen
-rw-r--r--config.def.h1
-rw-r--r--dwm.13
-rw-r--r--dwm.c8
3 files changed, 12 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index abc19b4..fb7da15 100644
--- a/config.def.h
+++ b/config.def.h
@@ -106,6 +106,7 @@ static Key keys[] = {
{ MODKEY|ControlMask, XK_o, setlayout, {.v = &layouts[6]} },
{ MODKEY|ControlMask, XK_p, setlayout, {.v = &layouts[7]} },
{ MODKEY|ShiftMask, XK_f, togglefloating, {0} },
+ { MODKEY|ControlMask, XK_f, togglefullscr, {0} },
{ MODKEY, XK_grave, togglegaps, {0} },
{ MODKEY|ShiftMask, XK_grave, togglebar, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
diff --git a/dwm.1 b/dwm.1
index ddc8321..3d310ac 100644
--- a/dwm.1
+++ b/dwm.1
@@ -116,6 +116,9 @@ Zooms/cycles focused window to/from master area (tiled layouts only).
.B Mod1\-Shift\-c
Close focused window.
.TP
+.B Mod1\-Shift\-f
+Toggle fullscreen for focused window.
+.TP
.B Mod1\-Shift\-space
Toggle focused window between tiled and floating state.
.TP
diff --git a/dwm.c b/dwm.c
index 0e9bc70..9b77f13 100644
--- a/dwm.c
+++ b/dwm.c
@@ -237,6 +237,7 @@ static void tag(const Arg *arg);
static void tagmon(const Arg *arg);
static void togglebar(const Arg *arg);
static void togglefloating(const Arg *arg);
+static void togglefullscr(const Arg *arg);
static void togglegaps(const Arg *arg);
static void toggletag(const Arg *arg);
static void toggleview(const Arg *arg);
@@ -2008,6 +2009,13 @@ togglegaps(const Arg *arg)
}
void
+togglefullscr(const Arg *arg)
+{
+ if(selmon->sel)
+ setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
+}
+
+void
toggletag(const Arg *arg)
{
unsigned int newtags;