From 420ceb49b53a8fa9d8ba8443e42e50cd7bd7cea9 Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Sun, 12 Jul 2026 11:08:50 +0200 Subject: update --- articles/2025/DWM-slstatus.html | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 articles/2025/DWM-slstatus.html (limited to 'articles/2025/DWM-slstatus.html') diff --git a/articles/2025/DWM-slstatus.html b/articles/2025/DWM-slstatus.html new file mode 100755 index 0000000..7ebef78 --- /dev/null +++ b/articles/2025/DWM-slstatus.html @@ -0,0 +1,46 @@ + + + + + + + DWM slstatus + + +
+

Bloggings

+ Back + +
+ +
+
+

DWM slstatus

+

2025-04-25

+

KISS

+

slstatus bar image

+

https://tools.suckless.org/slstatus/

+

After fiddling with dwm-blocks and dwm-bar, I decided that the only thing I want to see +in my status bar is battery info and date/time. The rest can be done with btop and alerts.

+

So I cloned the slstatus source code from suckless.org and added the following in slstatus/config.h

+
+static const struct arg args[] = {
+        /* function format          argument */
+        { battery_remaining, "%s",           "BAT0" },
+        { battery_state,     " %s",          "BAT0" },
+        { battery_perc,      " %s%%",        "BAT0" },
+        { datetime,          " | %s", "%a %d-%m %T" },
+};
+
+

As I'm using the Jetbrains mono nerdfont in DWM I added some icons in slstatus/components/battery.c

+

battery code

+
+
+ + + -- cgit v1.3.1