My slstatus configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

58 lines
2.8 KiB

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