diff options
| author | Philip Wittamore <philip@wittamore.com> | 2026-07-12 11:08:50 +0200 |
|---|---|---|
| committer | Philip Wittamore <philip@wittamore.com> | 2026-07-12 11:08:50 +0200 |
| commit | 420ceb49b53a8fa9d8ba8443e42e50cd7bd7cea9 (patch) | |
| tree | 3009f0564d75e3f7d1ca38507e7ebb92deaded07 /articles/2025/DWM-slstatus.html | |
update
Diffstat (limited to 'articles/2025/DWM-slstatus.html')
| -rwxr-xr-x | articles/2025/DWM-slstatus.html | 46 |
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> </p> + +<p>ยง</p> + </footer> +</body> +</html> |
