My slstatus configuration
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

před 8 roky
před 8 roky
před 8 roky
před 8 roky
před 8 roky
před 8 roky
před 8 roky
před 8 roky
před 8 roky
před 8 roky
před 8 roky
před 8 roky
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. ![slstatus](slstatus.png)
  2. **slstatus** is a suckless and lightweight status monitor for window managers that use WM_NAME as statusbar (e.g. DWM) or any other status bars if they support reading/piping from slstatus. It is written in pure C without any extern programs being executed and only reads from files most of the time. slstatus is meant to be a better alternative to Bash scripts (inefficient) and Conky (bloated and written in C++).
  3. If you write a bash script that shows system information in WM_NAME (or any other status bar), it executes a huge amount of external commands (top, free etc.) every few seconds. This results in high system resource usage. slstatus solves this problem by only using C libraries and/or reading from files in sysfs/procfs most of the time.
  4. Looking at the LOC (lines of code) of the [Conky project](https://github.com/brndnmtthws/conky), it is very interesting: *28346 lines C++, 219 lines Python and 110 lines Lua*. slstatus currently has about **800 lines of clean documented C code** and even includes additional possibilities as it can be customized and extended very easily. Configuring it by customizing the config.h (C header) file is very secure and fast as no config files are parsed at runtime.
  5. The following information is included:
  6. - Battery percentage/state
  7. - CPU usage (in percent)
  8. - Custom shell commands
  9. - Date and time
  10. - Disk[s] status (free storage, percentage, total storage and used storage)
  11. - Available entropy
  12. - Username/GID/UID
  13. - Hostname
  14. - IP addresses
  15. - Load averages
  16. - Memory status (free memory, percentage, total memory and used memory)
  17. - Temperature
  18. - Uptime
  19. - Volume percentage (ALSA)
  20. - WiFi signal percentage and ESSID
  21. Multiple entries per function (e.g. multiple batteries) are supported and everything can be reordered and customized via a C header file (similar to other suckless programs).
  22. ## Usage
  23. ### Installation
  24. Be sure you satisfy the dependencies: X11 and optionally ALSA (for volume percentage, I will *not* support PulseAudio).
  25. Also you should have basic development tools like a C compiler and GNU make installed.
  26. Then copy config.def.h to config.h and customize it to your needs.
  27. (Re)Compile (and install) it (after modifications):
  28. $ make clean all
  29. # make install
  30. ### Starting
  31. If you use DWM or any other window manager that uses WM_NAME, write the following code to ~/.xinitrc (or any other initialization script) to start slstatus automatically:
  32. slstatus -d
  33. If you use any other status bar or window manager you will have to figure it out yourself. Something like this could fit your requirements:
  34. slstatus -o | other_status_bar &
  35. ## Contributing
  36. Hunt FIXME's in the code or do WTF you want! If it is useful, I will merge.
  37. People who contributed are listed in [CONTRIBUTORS.md](CONTRIBUTORS.md). Please add yourself to this list afterwards.
  38. For detailed information about coding style and restrictions see [CONTRIBUTING.md](CONTRIBUTING.md).
  39. ## License
  40. See [LICENSE](LICENSE).