diff options
author | Joshua Yun <joshua@joshuayun.com> | 2025-04-01 00:29:34 -0500 |
---|---|---|
committer | Joshua Yun <joshua@joshuayun.com> | 2025-04-01 00:29:34 -0500 |
commit | 4c8d59a13cf615481694e07535ec672dcdab59aa (patch) | |
tree | fc54b3a890d2d29d3aa7da0b28ce35f47eb0113b | |
parent | f68f49273e70b3767b30c549dda04ddd4d25fc91 (diff) | |
download | slstatus-4c8d59a13cf615481694e07535ec672dcdab59aa.tar.gz |
feat: pamixer status bar for volume
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | config.def.h | 9 | ||||
-rw-r--r-- | slstatus.h | 1 |
3 files changed, 9 insertions, 2 deletions
@@ -20,6 +20,7 @@ COM =\ components/load_avg\ components/netspeeds\ components/num_files\ + components/pamixer_vol_perc\ components/ram\ components/run_command\ components/swap\ diff --git a/config.def.h b/config.def.h index d805331..2742f74 100644 --- a/config.def.h +++ b/config.def.h @@ -58,12 +58,17 @@ static const char unknown_str[] = "n/a"; * uid UID of current user NULL * uptime system uptime NULL * username username of current user NULL + * pamixer_vol_perc Pamixer volume in percent NULL * vol_perc OSS/ALSA volume in percent mixer file (/dev/mixer) * NULL on OpenBSD/FreeBSD * wifi_essid WiFi ESSID interface name (wlan0) * wifi_perc WiFi signal in percent interface name (wlan0) */ static const struct arg args[] = { - /* function format argument */ - { datetime, "%s", "%F %T" }, + /* function format argument */ + { cpu_perc, " CPU: %s%% | ", NULL }, + { ram_used, "RAM: %s / ", NULL }, + { ram_total, "%s | ", NULL }, + { pamixer_vol_perc, "Vol: %s | ", NULL }, + { datetime, "%s ", "%a %m/%d %r" }, }; @@ -78,6 +78,7 @@ const char *username(const char *unused); /* volume */ const char *vol_perc(const char *card); +const char *pamixer_vol_perc(const char *card); /* wifi */ const char *wifi_essid(const char *interface); |