config.def.h 654 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include <unistd.h>
  2. #include <X11/Xlib.h>
  3. #include "modules/status.h"
  4. #include "modules/clock.h"
  5. static Layout
  6. layouts[] = {
  7. // FORMAT SIZE TYPE FUNCTION
  8. {" time: %02d:", 16, type_int, {.d = get_hour}},
  9. {"%02d ", 8, type_int, {.d = get_minute}},
  10. };
  11. void
  12. set_status(char * str)
  13. {
  14. Display * dpy;
  15. if (!(dpy = XOpenDisplay(NULL))) {
  16. fprintf(stderr, "status: cannot open display.\n");
  17. return;
  18. }
  19. XStoreName(dpy, DefaultRootWindow(dpy), str);
  20. XSync(dpy, False);
  21. XCloseDisplay(dpy);
  22. }
  23. void
  24. update_arg(Arg * arg)
  25. {
  26. return;
  27. }