config.def.h 4.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /* See LICENSE file for copyright and license details. */
  2. /* interval between updates (in ms) */
  3. const unsigned int interval = 1000;
  4. /* text to show if no value can be retrieved */
  5. static const char unknown_str[] = "n/a";
  6. /* maximum output string length */
  7. #define MAXLEN 2048
  8. /*
  9. * function description argument (example)
  10. *
  11. * backlight_perc backlight percentage device name
  12. * (intel_backlight)
  13. * NULL on OpenBSD
  14. * battery_perc battery percentage battery name (BAT0)
  15. * NULL on OpenBSD/FreeBSD
  16. * battery_remaining battery remaining HH:MM battery name (BAT0)
  17. * NULL on OpenBSD/FreeBSD
  18. * battery_state battery charging state battery name (BAT0)
  19. * NULL on OpenBSD/FreeBSD
  20. * cat read arbitrary file path
  21. * cpu_freq cpu frequency in MHz NULL
  22. * cpu_perc cpu usage in percent NULL
  23. * datetime date and time format string (%F %T)
  24. * disk_free free disk space in GB mountpoint path (/)
  25. * disk_perc disk usage in percent mountpoint path (/)
  26. * disk_total total disk space in GB mountpoint path (/)
  27. * disk_used used disk space in GB mountpoint path (/)
  28. * entropy available entropy NULL
  29. * gid GID of current user NULL
  30. * hostname hostname NULL
  31. * ipv4 IPv4 address interface name (eth0)
  32. * ipv6 IPv6 address interface name (eth0)
  33. * kernel_release `uname -r` NULL
  34. * keyboard_indicators caps/num lock indicators format string (c?n?)
  35. * see keyboard_indicators.c
  36. * keymap layout (variant) of current NULL
  37. * keymap
  38. * load_avg load average NULL
  39. * netspeed_rx receive network speed interface name (wlan0)
  40. * netspeed_tx transfer network speed interface name (wlan0)
  41. * num_files number of files in a directory path
  42. * (/home/foo/Inbox/cur)
  43. * ram_free free memory in GB NULL
  44. * ram_perc memory usage in percent NULL
  45. * ram_total total memory size in GB NULL
  46. * ram_used used memory in GB NULL
  47. * run_command custom shell command command (echo foo)
  48. * swap_free free swap in GB NULL
  49. * swap_perc swap usage in percent NULL
  50. * swap_total total swap size in GB NULL
  51. * swap_used used swap in GB NULL
  52. * temp temperature in degree celsius sensor file
  53. * (/sys/class/thermal/...)
  54. * NULL on OpenBSD
  55. * thermal zone on FreeBSD
  56. * (tz0, tz1, etc.)
  57. * uid UID of current user NULL
  58. * uptime system uptime NULL
  59. * username username of current user NULL
  60. * alsa_master_vol ALSA Master device volume NULL
  61. * vol_perc OSS/ALSA volume in percent mixer file (/dev/mixer)
  62. * NULL on OpenBSD/FreeBSD
  63. * wifi_essid WiFi ESSID interface name (wlan0)
  64. * wifi_perc WiFi signal in percent interface name (wlan0)
  65. * text static text field text as string to display
  66. */
  67. static const struct arg args[] = {
  68. /* function format argument */
  69. { text, "\x02\uf04b\x01", NULL },
  70. { run_command, "%s", "cmussong" },
  71. { text, "\x02| \uf028\x01", NULL },
  72. //{ run_command, "\uf028 %s", "vol" },
  73. { alsa_master_vol, "%s", NULL },
  74. // laptop specific
  75. //{ run_command, " \uf0eb %s%%", "brt" },
  76. //{ backlight_perc, " \uf0eb %s", "amdgpu_bl0" },
  77. //{ battery_perc, " \uf240 %s%%", "BAT0" },
  78. //{ battery_state, "%s", "BAT0" },
  79. // laptop specific end
  80. { text, "\x02| \uf012\x01", NULL },
  81. { ipv4, "%s", "enp5s0" },
  82. //{ ipauto, " \uf012 %s", NULL },
  83. //{ run_command, " %s", "rxtx 1" },
  84. { text, "\x02| \uf017\x01", NULL },
  85. { datetime, "%s", "%T" },
  86. { text, "\x02| \uf073\x01", NULL },
  87. { datetime, "%s", "%F" },
  88. //{ username, "\x02|\x01%s ", NULL },
  89. { text, " \x06\uf19c ", NULL },
  90. };