Reorganize code and remove hack for empty block outputs

This commit is contained in:
Utkarsh Verma
2023-03-25 21:38:05 +05:30
parent f6a5fa6480
commit 8dd9bc6a7d
17 changed files with 531 additions and 362 deletions

23
src/x11.c Normal file
View File

@@ -0,0 +1,23 @@
#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);
}