aboutsummaryrefslogtreecommitdiff
path: root/articles/2025/DWM-slstatus.html
diff options
context:
space:
mode:
Diffstat (limited to 'articles/2025/DWM-slstatus.html')
-rwxr-xr-xarticles/2025/DWM-slstatus.html46
1 files changed, 46 insertions, 0 deletions
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 @@
+<!doctype html>
+<html lang="EN">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" href="/style.css">
+ <title>DWM slstatus</title>
+ </head>
+ <body>
+ <header>
+ <h1>Bloggings</h1>
+ <a href="/index.php">Back</a>
+
+ </header>
+
+<main>
+<article>
+<h2>DWM slstatus</h2>
+<h3>2025-04-25</h3>
+<h4>KISS</h4>
+<p><img src="/images/blog/slstatus.png" alt="slstatus bar image"></p>
+<p><a href="https://tools.suckless.org/slstatus/">https://tools.suckless.org/slstatus/</a></p>
+<p>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.</p>
+<p>So I cloned the slstatus source code from suckless.org and added the following in slstatus/config.h</p>
+<pre>
+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" },
+};
+</pre>
+<p>As I'm using the Jetbrains mono nerdfont in DWM I added some icons in slstatus/components/battery.c</p>
+<p><img src="/images/blog/battery.c.png" alt="battery code"></p>
+</article>
+</main>
+<footer>
+
+<p>&nbsp;</p>
+
+<p>ยง</p>
+ </footer>
+</body>
+</html>