Another copy of my dotfiles. Because I don't completely trust GitHub.
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.
|
#include <stdio.h>
|
|
#include <X11/Xlib.h>
|
|
|
|
int
|
|
main()
|
|
{
|
|
Display *dpy;
|
|
char *name;
|
|
|
|
if (!(dpy = XOpenDisplay(NULL))) {
|
|
fputs("Error: could not open display.\n", stderr);
|
|
return 1;
|
|
}
|
|
if (XFetchName(dpy, DefaultRootWindow(dpy), &name) && name[0])
|
|
printf("%s\n", name);
|
|
else
|
|
puts("No name has been set for the root window.");
|
|
XFree(name);
|
|
XCloseDisplay(dpy);
|
|
return 0;
|
|
}
|