1234567891011121314151617181920212223242526272829303132333435 |
- #include <unistd.h>
- #include <X11/Xlib.h>
- #include "modules/status.h"
- #include "modules/clock.h"
- static Layout
- layouts[] = {
- // FORMAT SIZE TYPE FUNCTION
- {" time: %02d:", 16, type_int, {.d = get_hour}},
- {"%02d ", 8, type_int, {.d = get_minute}},
- };
- void
- set_status(char * str)
- {
- Display * dpy;
- if (!(dpy = XOpenDisplay(NULL))) {
- fprintf(stderr, "status: cannot open display.\n");
- return;
- }
- XStoreName(dpy, DefaultRootWindow(dpy), str);
- XSync(dpy, False);
- XCloseDisplay(dpy);
- }
- void
- update_arg(Arg * arg)
- {
- return;
- }
|