summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfadhil riyanto <me@fadev.org>2024-08-17 15:09:17 +0700
committerfadhil riyanto <me@fadev.org>2024-08-17 15:09:17 +0700
commitfcc81c7f8e6efab177a55238188f5ea1e3db7734 (patch)
treecf77c4935b14ef94ac48ba441d838e9aa6d47b47
parent7d51287be3e926304c0453a5f2802860b9d34da2 (diff)
Xorg XStoreName programtically
Signed-off-by: fadhil riyanto <me@fadev.org>
-rw-r--r--xsetroot.c23
-rw-r--r--xtest.c9
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
diff --git a/xtest.c b/xtest.c
new file mode 100644
index 0000000..3e97161
--- /dev/null
+++ b/xtest.c
@@ -0,0 +1,9 @@
+
+
+
+int main(void)
+{
+
+
+
+} \ No newline at end of file