st-flexipatch

My st-flexipatch configuration
git clone git://git.ethandl.dev/st-flexipatch
Log | Files | Refs | README | LICENSE

commit 3947ceb4319bb6ccf3f1d812c1fb544194c1a817
parent cd1aa57a0650d62f15182d0103e0971784d26e7e
Author: Bakkeby <bakkeby@gmail.com>
Date:   Wed, 24 Aug 2022 11:04:49 +0200

Adding the no window decorations patch

Diffstat:
MREADME.md | 5+++++
Mpatches.def.h | 8++++++++
Mx.c | 7+++++++
3 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -15,6 +15,8 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the ### Changelog: +2022-08-24 - Added the no window decorations patch + 2022-04-11 - Added the background image reload patch 2022-03-10 - Added the background image patch @@ -203,6 +205,9 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the - allows you to spawn a new st terminal using Ctrl-Shift-Return - it will have the same CWD (current working directory) as the original st instance + - no-window-decorations + - makes st show without window decorations if the WM supports it + - [open-copied-url](https://st.suckless.org/patches/open_copied_url/) - open contents of the clipboard in a user-defined browser diff --git a/patches.def.h b/patches.def.h @@ -237,6 +237,14 @@ */ #define NEWTERM_PATCH 0 +/* This patch will set the _MOTIF_WM_HINTS property for the st window which, if the window manager + * respects it, will show the st window without window decorations. + * + * In dwm, if the decoration hints patch is applied, then the st window will start out without a + * border. In GNOME and KDE the window should start without a window title. + */ +#define NO_WINDOW_DECORATIONS_PATCH 0 + /* Open contents of the clipboard in a user-defined browser. * https://st.suckless.org/patches/open_copied_url/ */ diff --git a/x.c b/x.c @@ -1580,6 +1580,13 @@ xinit(int cols, int rows) PropModeReplace, (uchar *)&icon, LEN(icon)); #endif //NETWMICON_PATCH + #if NO_WINDOW_DECORATIONS_PATCH + Atom motifwmhints = XInternAtom(xw.dpy, "_MOTIF_WM_HINTS", False); + unsigned int data[] = { 0x2, 0x0, 0x0, 0x0, 0x0 }; + XChangeProperty(xw.dpy, xw.win, motifwmhints, motifwmhints, 16, + PropModeReplace, (unsigned char *)data, 5); + #endif // NO_WINDOW_DECORATIONS_PATCH + xw.netwmpid = XInternAtom(xw.dpy, "_NET_WM_PID", False); XChangeProperty(xw.dpy, xw.win, xw.netwmpid, XA_CARDINAL, 32, PropModeReplace, (uchar *)&thispid, 1);