spoon

set dwm status
git clone git://git.2f30.org/spoon
Log | Files | Refs | LICENSE

commit 98241199d1a07c7acabf1444889be02df3ea71ef
parent 220e144b8b8571343211d22f246a5477cbc305d0
Author: sin <sin@2f30.org>
Date:   Sun, 15 May 2016 16:39:25 +0100

Simplify root window handling

Diffstat:
Mspoon.c | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/spoon.c b/spoon.c @@ -189,18 +189,14 @@ loop(void) { char line[BUFSIZ]; Display *dpy; - int screen; - Window root; dpy = XOpenDisplay(NULL); if (dpy == NULL) errx(1, "cannot open display"); - screen = DefaultScreen(dpy); - root = RootWindow(dpy, screen); for (;;) { entcat(line, sizeof(line)); - XStoreName(dpy, root, line); + XStoreName(dpy, DefaultRootWindow(dpy), line); XSync(dpy, False); sleep(1); }