blocks.def.h 801 B

12345678910111213141516171819202122232425
  1. // utility macros
  2. #define SECONDS(n) (n * 1000)
  3. static const Block blocks[] = {
  4. /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
  5. // {"", "dwmblocks-battery", SECONDS(10), 0},
  6. {"", "[ \"$(fcitx5-remote)\" -eq 2 ] && printf '和' || printf '英'", 0, 2},
  7. {"", "dwmblocks-mu4e", SECONDS(15), 0},
  8. {"", "dwmblocks-volume", 0, 1},
  9. {" ", "date +'%a %b %d'", SECONDS(30), 0},
  10. {" ", "date +'%R'", SECONDS(2), 0},
  11. {"", "dwmblocks-network", SECONDS(5), 0},
  12. //{"", "dwmblocks-fcitx5", 250, 0},
  13. };
  14. #include "pulse-listener.h"
  15. static const ThreadCallback thread_callbacks[] = {
  16. pulse_listener_main
  17. };
  18. // sets delimeter between status commands. NULL character ('\0') means no delimeter.
  19. static char delim[] = " ";
  20. static unsigned int delimLen = 2;