Advertisement
PackRat-2017

slstatus config.h

Aug 10th, 2023
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | Source Code | 0 0
  1. /* See LICENSE file for copyright and license details. */
  2.  
  3. /* interval between updates (in ms) */
  4. const unsigned int interval = 1000;
  5.  
  6. /* text to show if no value can be retrieved */
  7. static const char unknown_str[] = "n/a";
  8.  
  9. /* maximum output string length */
  10. #define MAXLEN 2048
  11.  
  12. /*
  13. * function description argument (example)
  14. *
  15. * battery_perc battery percentage battery name (BAT0)
  16. * NULL on OpenBSD/FreeBSD
  17. * battery_remaining battery remaining HH:MM battery name (BAT0)
  18. * NULL on OpenBSD/FreeBSD
  19. * battery_state battery charging state battery name (BAT0)
  20. * NULL on OpenBSD/FreeBSD
  21. * cat read arbitrary file path
  22. * cpu_freq cpu frequency in MHz NULL
  23. * cpu_perc cpu usage in percent NULL
  24. * datetime date and time format string (%F %T)
  25. * disk_free free disk space in GB mountpoint path (/)
  26. * disk_perc disk usage in percent mountpoint path (/)
  27. * disk_total total disk space in GB mountpoint path (/)
  28. * disk_used used disk space in GB mountpoint path (/)
  29. * entropy available entropy NULL
  30. * gid GID of current user NULL
  31. * hostname hostname NULL
  32. * ipv4 IPv4 address interface name (eth0)
  33. * ipv6 IPv6 address interface name (eth0)
  34. * kernel_release `uname -r` NULL
  35. * keyboard_indicators caps/num lock indicators format string (c?n?)
  36. * see keyboard_indicators.c
  37. * keymap layout (variant) of current NULL
  38. * keymap
  39. * load_avg load average NULL
  40. * netspeed_rx receive network speed interface name (wlan0)
  41. * netspeed_tx transfer network speed interface name (wlan0)
  42. * num_files number of files in a directory path
  43. * (/home/foo/Inbox/cur)
  44. * ram_free free memory in GB NULL
  45. * ram_perc memory usage in percent NULL
  46. * ram_total total memory size in GB NULL
  47. * ram_used used memory in GB NULL
  48. * run_command custom shell command command (echo foo)
  49. * swap_free free swap in GB NULL
  50. * swap_perc swap usage in percent NULL
  51. * swap_total total swap size in GB NULL
  52. * swap_used used swap in GB NULL
  53. * temp temperature in degree celsius sensor file
  54. * (/sys/class/thermal/...)
  55. * NULL on OpenBSD
  56. * thermal zone on FreeBSD
  57. * (tz0, tz1, etc.)
  58. * uid UID of current user NULL
  59. * uptime system uptime NULL
  60. * username username of current user 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. */
  66. static const struct arg args[] = {
  67. /* function format argument */
  68. /* { uptime, "UP: %s ", NULL }, */
  69. { cpu_perc, "CPU: %3s%% ", NULL },
  70. /* { load_avg, "%s ", NULL }, */
  71. { temp, "CPU: %3s°C ", "/sys/devices/platform/coretemp.0/hwmon/hwmon5/temp1_input" },
  72. { temp, "SSD: %3s°C ", "/sys/devices/pci0000:00/0000:00:1d.4/0000:03:00.0/nvme/nvme0/hwmon0/temp1_input" },
  73. { ram_perc, "MEM: %3s%% ", NULL },
  74. { battery_perc, "BAT: %3s%% ", "BAT0" },
  75. { battery_state, "%s ", "BAT0" },
  76. { wifi_perc, "NET: %3s%% ", "wlp2s0" },
  77. { netspeed_tx, "%6s ", "wlp2s0" },
  78. { netspeed_rx, "%6s ", "wlp2s0" },
  79. { datetime, "%s", "%a %e %b %k:%M " },
  80. };
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement