dwm-old

my heavily-patched and customized dwm build
git clone git://git.kocotian.pl/dwm.git
Log | Files | Refs | README | LICENSE

dwm-actualfullscreen-20191112-cb3f58a.diff (1751B)


      1 From 3a16816a6f5d38014c2a06ce395873c545c8789a Mon Sep 17 00:00:00 2001
      2 From: Soenke Lambert <s.lambert@mittwald.de>
      3 Date: Tue, 12 Nov 2019 10:44:02 +0100
      4 Subject: [PATCH] Fullscreen current window with [Alt]+[Shift]+[f]
      5 
      6 This actually fullscreens a window, instead of just hiding the statusbar
      7 and applying the monocle layout.
      8 ---
      9  config.def.h | 1 +
     10  dwm.c        | 8 ++++++++
     11  2 files changed, 9 insertions(+)
     12 
     13 diff --git a/config.def.h b/config.def.h
     14 index 1c0b587..8cd3204 100644
     15 --- a/config.def.h
     16 +++ b/config.def.h
     17 @@ -78,6 +78,7 @@ static Key keys[] = {
     18  	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
     19  	{ MODKEY,                       XK_space,  setlayout,      {0} },
     20  	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
     21 +	{ MODKEY|ShiftMask,             XK_f,      togglefullscr,  {0} },
     22  	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
     23  	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
     24  	{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
     25 diff --git a/dwm.c b/dwm.c
     26 index 4465af1..c1b899a 100644
     27 --- a/dwm.c
     28 +++ b/dwm.c
     29 @@ -211,6 +211,7 @@ static void tagmon(const Arg *arg);
     30  static void tile(Monitor *);
     31  static void togglebar(const Arg *arg);
     32  static void togglefloating(const Arg *arg);
     33 +static void togglefullscr(const Arg *arg);
     34  static void toggletag(const Arg *arg);
     35  static void toggleview(const Arg *arg);
     36  static void unfocus(Client *c, int setfocus);
     37 @@ -1719,6 +1720,13 @@ togglefloating(const Arg *arg)
     38  	arrange(selmon);
     39  }
     40  
     41 +void
     42 +togglefullscr(const Arg *arg)
     43 +{
     44 +  if(selmon->sel)
     45 +    setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
     46 +}
     47 +
     48  void
     49  toggletag(const Arg *arg)
     50  {
     51 -- 
     52 2.17.1
     53