config.def.h 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. * battery_perc battery percentage battery name (BAT0)
  12. * NULL on OpenBSD/FreeBSD/NetBSD
  13. * battery_remaining battery remaining HH:MM battery name (BAT0)
  14. * NULL on OpenBSD/FreeBSD
  15. * battery_state battery charging state battery name (BAT0)
  16. * NULL on OpenBSD/FreeBSD
  17. * cat read arbitrary file path
  18. * cpu_freq cpu frequency in MHz NULL
  19. * cpu_perc cpu usage in percent NULL
  20. * datetime date and time format string (%F %T)
  21. * disk_free free disk space in GB mountpoint path (/)
  22. * disk_perc disk usage in percent mountpoint path (/)
  23. * disk_total total disk space in GB mountpoint path (/)
  24. * disk_used used disk space in GB mountpoint path (/)
  25. * entropy available entropy NULL
  26. * gid GID of current user NULL
  27. * hostname hostname NULL
  28. * ipv4 IPv4 address interface name (eth0)
  29. * ipv6 IPv6 address interface name (eth0)
  30. * kernel_release `uname -r` NULL
  31. * keyboard_indicators caps/num lock indicators format string (c?n?)
  32. * see keyboard_indicators.c
  33. * keymap layout (variant) of current NULL
  34. * keymap
  35. * load_avg load average NULL
  36. * netspeed_rx receive network speed interface name (wlan0)
  37. * netspeed_tx transfer network speed interface name (wlan0)
  38. * num_files number of files in a directory path
  39. * (/home/foo/Inbox/cur)
  40. * ram_free free memory in GB NULL
  41. * ram_perc memory usage in percent NULL
  42. * ram_total total memory size in GB NULL
  43. * ram_used used memory in GB NULL
  44. * run_command custom shell command command (echo foo)
  45. * swap_free free swap in GB NULL
  46. * swap_perc swap usage in percent NULL
  47. * swap_total total swap size in GB NULL
  48. * swap_used used swap in GB NULL
  49. * temp temperature in degree celsius sensor file
  50. * (/sys/class/thermal/...)
  51. * NULL on OpenBSD
  52. * thermal zone on FreeBSD
  53. * (tz0, tz1, etc.)
  54. * uid UID of current user NULL
  55. * uptime system uptime NULL
  56. * username username of current user NULL
  57. * vol_perc OSS/ALSA volume in percent mixer file (/dev/mixer)
  58. * NULL on OpenBSD/FreeBSD
  59. * mixerctl var on NetBSD (outputs.master, outputs.master2)
  60. * wifi_essid WiFi ESSID interface name (wlan0)
  61. * wifi_perc WiFi signal in percent interface name (wlan0)
  62. */
  63. static const struct arg args[] = {
  64. /* function format argument */
  65. { datetime, "[%s]", "%F %T" },
  66. { cpu_perc, " [CPU:%s%%]", NULL},
  67. { ram_used, " [RAM:%s/", NULL},
  68. { ram_total, "%s]", NULL},
  69. { vol_perc, " [VOL:%s%%]", "outputs.master"},
  70. { battery_perc, " [BAT:%s%%]", NULL},
  71. };