**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++).
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.
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.
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).
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: