Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <X11/Xlib.h>
- int main()
- {
- Display* d = XOpenDisplay(0);
- Window root = XDefaultRootWindow(d);
- // this is the static version of the program which must be changed, to be configurable
- const unsigned char* newNames = (const unsigned char*) "as\0df\0"; // \0 seperated list of the new names (i.e. in this case first desktop is named "as" and second "df"
- int newNamesLength = 6; // 6 characters - including all the \0
- // end of the static stuff which should be made configurable
- // if you have correctly initialized the variables newNames and newNamesLength, then the next command will just update your desktop names...
- XChangeProperty(d, root, XInternAtom(d, "_NET_DESKTOP_NAMES", false), XInternAtom(d, "UTF8_STRING", false), 8, PropModeReplace, newNames, newNamesLength);
- XCloseDisplay(d);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement