summaryrefslogtreecommitdiff
path: root/components/volume
diff options
context:
space:
mode:
authorozpv <39195175+ozpv@users.noreply.github.com>2023-05-05 01:30:18 +0000
committerGitHub <noreply@github.com>2023-05-05 01:30:18 +0000
commit9e533dcb56f3d34a85b5ba7f279c2870ebcc4034 (patch)
tree2d8894929472113bd47a151e724d2de38d2be13f /components/volume
parenta8eb66bddbb9b26f977b1fbc37437cc4444aa767 (diff)
init
Diffstat (limited to 'components/volume')
-rw-r--r--components/volume4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/volume b/components/volume
new file mode 100644
index 0000000..3249774
--- /dev/null
+++ b/components/volume
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+vol="$(pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,')"
+[ "$vol" = "0" ] && echo "ﱝ muted" || echo "墳 ${vol}%"