diff --git a/README b/README.md similarity index 74% rename from README rename to README.md index 12d38bf..852317b 100644 --- a/README +++ b/README.md @@ -1,13 +1,17 @@ -slstatus - suckless status -========================== +# slstatus - suckless status slstatus is a small tool for providing system status information to other programs over the EWMH property of the root window (used by dwm(1)) or standard input/output. It is designed to be as efficient as possible by only issuing the minimum of system calls required. +## Applied patches +- [backlight](https://tools.suckless.org/slstatus/patches/backlight) +- [kanji](https://tools.suckless.org/slstatus/patches/kanji) +- [signals](https://tools.suckless.org/slstatus/patches/signals) +- [No x11](https://codeberg.org/sewn/slstatus) -Features --------- +# Features +- Backlight percentage - Battery percentage/state/time left - Cat (read file) - CPU usage @@ -19,6 +23,7 @@ Features - Username/GID/UID - Hostname - IP address (IPv4 and IPv6) +- Kanji - Kernel version - Keyboard indicators - Keymap @@ -32,9 +37,7 @@ Features - Volume percentage - WiFi signal percentage and ESSID - -Requirements ------------- +# Requirements Currently slstatus works on FreeBSD, Linux and OpenBSD. In order to build slstatus you need the Xlib header files. @@ -43,23 +46,18 @@ In order to build slstatus you need the Xlib header files. - For volume percentage on FreeBSD, `sndio` must be installed. -Installation ------------- -Edit config.mk to match your local setup (slstatus is installed into the -/usr/local namespace by default). +# Installation +Edit `config.mk` to match your local setup (slstatus is installed into the +`/usr/local/` namespace by default). Afterwards enter the following command to build and install slstatus (if necessary as root): make clean install - -Running slstatus ----------------- +# Running slstatus See the man page for details. - -Configuration -------------- +# Configuration slstatus can be customized by creating a custom config.h and (re)compiling the source code. This keeps it fast, secure and simple. diff --git a/components/backlight.c b/components/backlight.c index 46240f6..1b5820a 100644 --- a/components/backlight.c +++ b/components/backlight.c @@ -30,7 +30,7 @@ return NULL; } - return bprintf("%d%%", cur * 100 / max); + return bprintf("%d", cur * 100 / max); } #elif defined(__OpenBSD__) #include diff --git a/config.h b/config.h index edb54ff..1e20060 100644 --- a/config.h +++ b/config.h @@ -74,15 +74,14 @@ static const char unknown_str[] = "n/a"; static const struct arg args[] = { /* function format argument turn signal */ - { cpu_perc, " [  %s% ]", NULL, 1, -1, }, - { ram_perc, "[  %s% ]", NULL, 1, -1, }, - { backlight_perc, "[ 󰃠 %s ]", "intel_backlight", 1, 4, }, - { run_command, "[ 󰍬 %s ]", "getvol -m", 1, 3, }, - // { vol_perc, "[ 󰍬 %s ]", "Capture", 1, 3, }, - { vol_icon, "[ %s%% ]", "Master", 1, 2, }, - { battery_icon, "[ %s%% ]", "BAT1", 1, -1, }, - { datetime, "[ 󰥔 %s ]", "%I:%M %p", 1, -1, }, - { datetime, "[ 󰸗 %s ]", "%b %d", 1, -1, }, + { cpu_perc, " [  %s%% ] ",NULL, 1, -1, }, + { ram_perc, "[  %s%% ] ", NULL, 1, -1, }, + { backlight_perc, "[ 󰃠 %s%% ] ", "intel_backlight", 1, 4, }, + { run_command, "[ 󰍬 %s%% ] ", "getvol -m", 1, 3, }, + { vol_icon, "[ %s%% ] ", "Master", 1, 2, }, + { battery_icon, "[ %s%% ] ", "BAT1", 1, -1, }, + { datetime, "[ 󰥔 %s ] ", "%I:%M %p", 1, -1, }, + { datetime, "[ 󰸗 %s ] ", "%b %d", 1, -1, }, }; /* maximum output string length */