xbattmon

simple battery monitor for X
git clone git://git.2f30.org/xbattmon.git
Log | Files | Refs | README | LICENSE

commit b25283949ee854851d7940ffc08556bbdb7c69a4
parent 8bc2d8e8b07eedb8cbdc0b70fdab31e763ca72aa
Author: lostd <lostd@2f30.org>
Date:   Thu Mar 26 15:21:16 +0200

Set the dock hint for managers and compositors

Diffstat:
xbattmon.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/xbattmon.c b/xbattmon.c @@ -1,5 +1,6 @@ /* See LICENSE file for copyright and license details. */ #include <X11/Xlib.h> +#include <X11/Xatom.h> #include <X11/Xutil.h> #include <err.h> #include <errno.h> @@ -54,6 +55,7 @@ setup(void) XSetWindowAttributes attr; XColor color, exact; XTextProperty text; + Atom wintype, wintype_dock; static char *name = "xbattmon"; int r; int screen; @@ -113,6 +115,11 @@ setup(void) XStringListToTextProperty(&name, 1, &text); XSetWMName(dpy, winbar, &text); + wintype = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", True); + wintype_dock = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DOCK", True); + XChangeProperty(dpy, winbar, wintype, XA_ATOM, 32, + PropModeReplace, (unsigned char *)&wintype_dock, 1); + XSelectInput(dpy, winbar, ExposureMask | VisibilityChangeMask); if (raise == 1) XMapRaised(dpy, winbar);