summaryrefslogtreecommitdiff
path: root/i3blocks_volume
diff options
context:
space:
mode:
Diffstat (limited to 'i3blocks_volume')
-rwxr-xr-xi3blocks_volume7
1 files changed, 7 insertions, 0 deletions
diff --git a/i3blocks_volume b/i3blocks_volume
new file mode 100755
index 0000000..787e621
--- /dev/null
+++ b/i3blocks_volume
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+if [ "$(pactl get-sink-mute @DEFAULT_SINK@)" = "Mute: yes" ]; then
+ echo " mute"
+else
+ echo " $(pactl get-sink-volume @DEFAULT_SINK@ | awk '{printf "%s", substr($5, 1, length($5) - 1)}')"
+fi