Adding togglefullscreen patch

This commit is contained in:
bakkeby 2019-09-05 23:27:33 +02:00
parent e681ab5dd9
commit 448f8db4c2
7 changed files with 31 additions and 3 deletions

View File

@ -11,7 +11,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog:
2019-09-05 - Alpha, systray, pertag and zoomswap patches added
2019-09-05 - Alpha, systray, togglefullscreen, pertag and zoomswap patches added
### Patches included:
@ -24,6 +24,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
- [systray](https://dwm.suckless.org/patches/systray/)
- adds system tray in the status bar
- [togglefullscreen](https://github.com/bakkeby/dwm-vanitygaps/blob/master/patches/dwm-togglefullscreen-6.2.diff)
- allows you to toggle fullscreen on and off using a single shortcut key
- [zoomswap](https://dwm.suckless.org/patches/zoomswap/)
- allows a master and a stack window to swap places rather than every window on the screen changing position

View File

@ -93,6 +93,9 @@ static Key keys[] = {
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
#if TOGGLEFULLSCREEN_PATCH
{ MODKEY, XK_y, togglefullscreen, {0} },
#endif // TOGGLEFULLSCREEN_PATCH
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },

View File

@ -10,6 +10,10 @@
#include "systray.c"
#endif
#if TOGGLEFULLSCREEN_PATCH
#include "togglefullscreen.c"
#endif
#if ZOOMSWAP_PATCH
#include "zoomswap.c"
#endif // ZOOMSWAP_PATCH
#endif

View File

@ -6,6 +6,10 @@
#include "systray.h"
#endif
#if TOGGLEFULLSCREEN_PATCH
#include "togglefullscreen.h"
#endif
#if ZOOMSWAP_PATCH
#include "zoomswap.h"
#endif // ZOOMSWAP_PATCH
#endif

7
patch/togglefullscreen.c Normal file
View File

@ -0,0 +1,7 @@
void
togglefullscreen(const Arg *arg) {
if (!selmon->sel)
return;
setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
}

1
patch/togglefullscreen.h Normal file
View File

@ -0,0 +1 @@
static void togglefullscreen(const Arg *arg);

View File

@ -28,6 +28,12 @@
*/
#define PERTAGBAR_PATCH 0
/* This patch allows you to toggle fullscreen on and off using a single shortcut key.
* https://github.com/bakkeby/dwm-vanitygaps/blob/master/patches/dwm-togglefullscreen-6.2.diff
*/
#define TOGGLEFULLSCREEN_PATCH 1
/* The zoomswap patch allows a master and a stack window to swap places
* rather than every window on the screen changing position.
* https://dwm.suckless.org/patches/zoomswap/