mirror of https://github.com/tiyn/dwmblocks
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
398 B
26 lines
398 B
#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;
|
|
}
|
|
|
|
int closeX() {
|
|
return XCloseDisplay(display);
|
|
}
|
|
|
|
void setXRootName(char *str) {
|
|
XStoreName(display, rootWindow, str);
|
|
XFlush(display);
|
|
}
|