summaryrefslogtreecommitdiff
path: root/.config/waybar/getvolume.sh~
diff options
context:
space:
mode:
authorLaura <the-ceo-of-antifa@protonmail.com>2023-04-25 22:07:28 +0200
committerLaura <the-ceo-of-antifa@protonmail.com>2023-04-25 22:07:28 +0200
commitd59d414a9ffc7245ecda913b1f6577be14385c83 (patch)
tree83ddfd35b37008e249162387b0647ffe369555b8 /.config/waybar/getvolume.sh~
downloaddotfiles-d59d414a9ffc7245ecda913b1f6577be14385c83.tar.gz
dotfiles-d59d414a9ffc7245ecda913b1f6577be14385c83.zip
Initial commit
Diffstat (limited to '.config/waybar/getvolume.sh~')
-rwxr-xr-x.config/waybar/getvolume.sh~8
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/waybar/getvolume.sh~ b/.config/waybar/getvolume.sh~
new file mode 100755
index 0000000..306f18d
--- /dev/null
+++ b/.config/waybar/getvolume.sh~
@@ -0,0 +1,8 @@
+#!/bin/sh
+if test "Mute: yes" = "$(pactl get-sink-mute 0)"
+then
+ echo 
+ exit
+fi
+
+echo  $(pactl get-sink-volume $(pactl list sinks |sed '/^Sink #./!d;s/^Sink #\(.\)/\1/' |tail -n1) |sed -E '/balance/d;s/.*([0-9 ][0-9 ][0-9]%).*/\1/' |tr -d " ")