My slstatus configuration
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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). It is written in pure C without any system calls and only reads from files most of the time. It is meant to be a better alternative to Bash scripts (inefficient) and Conky (bloated for this use).
  3. If you write a bash script that shows system information in WM_NAME, 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.
  4. Looking at the LOC (lines of code) of the [Conky project](https://github.com/brndnmtthws/conky), very interesting: *28.346 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. Configure it by customizing the config.h (C header file) which is secure and fast as no config files are parsed at runtime.
  5. The following information is included:
  6. - Battery percentage
  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 average
  16. - Memory status (free memory, percentage, total memory and used memory)
  17. - Temperature
  18. - Uptime
  19. - Volume percentage + mute status (alsa)
  20. - WiFi signal percentage and essid
  21. Multiple entries per function are supported and everything can be reordered and customized via the C header file config.h (similar to DWM).
  22. ## Usage
  23. ### Installation
  24. Before you continue, please be sure that a C compiler (preferrably gcc), GNU make and `alsa-lib` (for volume percentage) are installed. Then copy config.def.h to config.h and customize it to fit your needs. Recompile and install it after modifications:
  25. $ make clean all
  26. # make install
  27. ### Starting
  28. Write the following code to your ~/.xinitrc (or any other initialization script):
  29. slstatus &
  30. ## Contributing
  31. In [TODO.md](TODO.md) there is a list of things that have to be done.
  32. People who contributed are listed in [CONTRIBUTORS.md](CONTRIBUTORS.md).
  33. For detailed information about coding style and restrictions see [CONTRIBUTING.md](CONTRIBUTING.md)
  34. ## License
  35. See [LICENSE](LICENSE).