My slstatus configuration
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

config.def.h 3.3 KiB

pirms 8 gadiem
pirms 8 gadiem
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* See LICENSE file for copyright and license details. */
  2. /* interval between updates (in ms) */
  3. static 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
  13. * battery_state battery charging state battery name (BAT0)
  14. * NULL on OpenBSD
  15. * battery_remaining battery remaining HH:MM battery name (BAT0)
  16. * NULL on OpenBSD
  17. * cpu_perc cpu usage in percent NULL
  18. * cpu_freq cpu frequency in MHz NULL
  19. * datetime date and time format string (%F %T)
  20. * disk_free free disk space in GB mountpoint path (/)
  21. * disk_perc disk usage in percent mountpoint path (/)
  22. * disk_total total disk space in GB mountpoint path (/")
  23. * disk_used used disk space in GB mountpoint path (/)
  24. * entropy available entropy NULL
  25. * gid GID of current user NULL
  26. * hostname hostname NULL
  27. * ipv4 IPv4 address interface name (eth0)
  28. * ipv6 IPv6 address interface name (eth0)
  29. * kernel_release `uname -r` NULL
  30. * keyboard_indicators caps/num lock indicators NULL
  31. * load_avg load average format string
  32. * (%.2f %.2f %.2f)
  33. * num_files number of files in a directory path
  34. * (/home/foo/Inbox/cur)
  35. * ram_free free memory in GB NULL
  36. * ram_perc memory usage in percent NULL
  37. * ram_total total memory size in GB NULL
  38. * ram_used used memory in GB NULL
  39. * run_command custom shell command command (echo foo)
  40. * swap_free free swap in GB NULL
  41. * swap_perc swap usage in percent NULL
  42. * swap_total total swap size in GB NULL
  43. * swap_used used swap in GB NULL
  44. * temp temperature in degree celsius sensor file
  45. * (/sys/class/thermal/...)
  46. * NULL on OpenBSD
  47. * uid UID of current user NULL
  48. * uptime system uptime NULL
  49. * username username of current user NULL
  50. * vol_perc OSS/ALSA volume in percent mixer file (/dev/mixer)
  51. * wifi_perc WiFi signal in percent interface name (wlan0)
  52. * wifi_essid WiFi ESSID interface name (wlan0)
  53. */
  54. static const struct arg args[] = {
  55. /* function format argument */
  56. { datetime, "%s", "%F %T" },
  57. };