config.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. // Colors for dwm
  22. #define COL1 "\x0b"
  23. #define COL2 "\x0c"
  24. #define COL3 "\x0d"
  25. #define COL4 "\x0e"
  26. #define COL5 "\x0f"
  27. #define COL6 "\x10"
  28. #define COL7 "\x11"
  29. /* clang-format off */
  30. static struct arg_t args[] = {
  31. /* function format argument interval (in ms) */
  32. #if USE_X
  33. /* { bspwm_ws, " [ %s ]%%{r}", NULL, 0, END }, */
  34. #endif
  35. // { disk_perc, " [# %s%%", "/", 25 _SEC, END },
  36. // { disk_free, " %s]", "/", 25 _SEC, END },
  37. // { load_avg, "-[%s]", NULL, 3 _SEC, END },
  38. { vol_perc, COL1 "%s ", NULL, 0, END },
  39. { cpu_freq, COL2 "  %sHz", NULL, 1 _SEC, END },
  40. { cpu_perc, " %s%% ", NULL, 1 _SEC, END },
  41. { ram_used, COL3 " ﬙ %sB", NULL, 1 _SEC, END },
  42. { ram_perc, " %s%% ", NULL, 1 _SEC, END },
  43. // { wifi_essid, "-[直 \"%s\"", IFC, 2 _SEC, END },
  44. // { wifi_perc, " %3s%%]", IFC, 2 _SEC, END },
  45. { battery_state, COL4 " %s", "BAT0", 1 _MIN, END },
  46. { battery_perc, "%s%% ", "BAT0", 1 _MIN, END },
  47. #if USE_WEATHER
  48. { weather, COL5 " %s °F ", NULL, 30 _MIN, END },
  49. #endif
  50. { datetime, COL6 " %s", " %b %-m : %a %-d " COL7 "  %-l:%M %p", 1 _SEC, END },
  51. // #if USE_X && USE_XKB
  52. // { keymap, "-[ %s] ", NULL, 0, END },
  53. // #endif
  54. };
  55. /* clang-format on */