Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.7 KiB

4 years ago
  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. This actually fullscreens a window, instead of just hiding the statusbar
  6. and applying the monocle layout.
  7. ---
  8. config.def.h | 1 +
  9. dwm.c | 8 ++++++++
  10. 2 files changed, 9 insertions(+)
  11. diff --git a/config.def.h b/config.def.h
  12. index 1c0b587..8cd3204 100644
  13. --- a/config.def.h
  14. +++ b/config.def.h
  15. @@ -78,6 +78,7 @@ static Key keys[] = {
  16. { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
  17. { MODKEY, XK_space, setlayout, {0} },
  18. { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
  19. + { MODKEY|ShiftMask, XK_f, togglefullscr, {0} },
  20. { MODKEY, XK_0, view, {.ui = ~0 } },
  21. { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
  22. { MODKEY, XK_comma, focusmon, {.i = -1 } },
  23. diff --git a/dwm.c b/dwm.c
  24. index 4465af1..c1b899a 100644
  25. --- a/dwm.c
  26. +++ b/dwm.c
  27. @@ -211,6 +211,7 @@ static void tagmon(const Arg *arg);
  28. static void tile(Monitor *);
  29. static void togglebar(const Arg *arg);
  30. static void togglefloating(const Arg *arg);
  31. +static void togglefullscr(const Arg *arg);
  32. static void toggletag(const Arg *arg);
  33. static void toggleview(const Arg *arg);
  34. static void unfocus(Client *c, int setfocus);
  35. @@ -1719,6 +1720,13 @@ togglefloating(const Arg *arg)
  36. arrange(selmon);
  37. }
  38. +void
  39. +togglefullscr(const Arg *arg)
  40. +{
  41. + if(selmon->sel)
  42. + setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
  43. +}
  44. +
  45. void
  46. toggletag(const Arg *arg)
  47. {
  48. --
  49. 2.17.1