dwmblocks/src/x11.c

26 lines
398 B
C
Raw Normal View History

#include "x11.h"
#include <X11/Xlib.h>
static Display *display;
static Window rootWindow;
int setupX() {
display = XOpenDisplay(NULL);
if (!display) {
return 1;
}
rootWindow = DefaultRootWindow(display);
return 0;
}
2023-04-06 06:18:16 +05:30
int closeX() {
return XCloseDisplay(display);
}
void setXRootName(char *str) {
XStoreName(display, rootWindow, str);
XFlush(display);
}