Created
February 27, 2016 02:45
-
-
Save jgriffiths/181d08c6ca6b0779f7ab to your computer and use it in GitHub Desktop.
hacky program to demonstrate _KDE_NET_WM_COLOR_SCHEME
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <X11/Xlib.h> | |
#include <X11/Xos.h> | |
#include <X11/Xatom.h> | |
int main(int argc, const char* argv[]) | |
{ | |
Display *d = XOpenDisplay(NULL); | |
Window w = XCreateSimpleWindow(d, RootWindow(d, 0), 1, 1, 500, 500, 0, | |
BlackPixel (d, 0), BlackPixel(d, 0)); | |
Atom a; | |
XMapWindow(d, w); | |
if ((a = XInternAtom(d, argv[1], False)) != None) | |
XChangeProperty(d, w, a, XA_STRING, 8, PropModeReplace, argv[2], strlen(argv[2])); | |
XFlush(d); | |
sleep(30); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment