config.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * for components info see: wiki/COMPONENTS.md
  3. *
  4. * extra configs in can be found in `components_config.h`
  5. */
  6. /* for usleep */
  7. #define _SEC *1000
  8. #define _MIN *(60 _SEC)
  9. #define _HR *(60 _MIN)
  10. /* interval to run only once */
  11. #define ONCE ((unsigned int)-1)
  12. /* text to show if no value can be retrieved */
  13. static const char unknown_str[] = "n/a";
  14. /* maximum output string length */
  15. #define MAXLEN 256
  16. /*
  17. * if you want to change buffer size for each segment,
  18. * then change `BUFF_SZ` in lib/util.h
  19. */
  20. #define IFC "wlan0" /* wifi interface */
  21. /* clang-format off */
  22. static struct arg_t args[] = {
  23. /* function format argument interval (in ms) */
  24. #if USE_X
  25. /* { bspwm_ws, " [ %s ]%%{r}", NULL, 0, END }, */
  26. #endif
  27. { disk_perc, " [# %s%%", "/", 25 _SEC, END },
  28. { disk_free, " %s]", "/", 25 _SEC, END },
  29. { cpu_perc, "-[ %3s%%]", NULL, 1 _SEC, END },
  30. { load_avg, "-[%s]", NULL, 3 _SEC, END },
  31. { ram_used, "-[﬙ %s]", NULL, 3 _SEC, END },
  32. { vol_perc, "-[%s]", NULL, 0, END },
  33. { wifi_essid, "-[直 \"%s\"", IFC, 2 _SEC, END },
  34. { wifi_perc, " %3s%%]", IFC, 2 _SEC, END },
  35. { battery_state, "-[%s", "BAT0", 2 _SEC, END },
  36. { battery_perc, " %3s%%]", "BAT0", 1 _MIN, END },
  37. { datetime, "-[ %s]", "%H:%M:%S", 1 _SEC, END },
  38. #if USE_X && USE_XKB
  39. { keymap, "-[ %s] ", NULL, 0, END },
  40. #endif
  41. };
  42. /* clang-format on */