diff options
author | fadhil riyanto <me@fadev.org> | 2024-08-17 15:09:17 +0700 |
---|---|---|
committer | fadhil riyanto <me@fadev.org> | 2024-08-17 15:09:17 +0700 |
commit | fcc81c7f8e6efab177a55238188f5ea1e3db7734 (patch) | |
tree | cf77c4935b14ef94ac48ba441d838e9aa6d47b47 | |
parent | 7d51287be3e926304c0453a5f2802860b9d34da2 (diff) |
Xorg XStoreName programtically
Signed-off-by: fadhil riyanto <me@fadev.org>
-rw-r--r-- | xsetroot.c | 23 | ||||
-rw-r--r-- | xtest.c | 9 |
2 files changed, 32 insertions, 0 deletions
diff --git a/xsetroot.c b/xsetroot.c new file mode 100644 index 0000000..4181a27 --- /dev/null +++ b/xsetroot.c @@ -0,0 +1,23 @@ +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <X11/Xatom.h> +#include <X11/Xmu/CurUtil.h> +#include <X11/Xcursor/Xcursor.h> +#include <time.h> + + +void xsetroot(char* text) +{ + static Display *dpy; + static int screen; + + static Window root; + + dpy = XOpenDisplay(NULL); + screen = DefaultScreen(dpy); + root = RootWindow(dpy, screen); + + XStoreName(dpy, root, "test aaaa name"); + + XCloseDisplay(dpy); +}
\ No newline at end of file @@ -0,0 +1,9 @@ + + + +int main(void) +{ + + + +}
\ No newline at end of file |