aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/config/i3pystatus/get_volume.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/config/i3pystatus/get_volume.sh')
-rwxr-xr-xdotfiles/config/i3pystatus/get_volume.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/dotfiles/config/i3pystatus/get_volume.sh b/dotfiles/config/i3pystatus/get_volume.sh
new file mode 100755
index 0000000..e0372f2
--- /dev/null
+++ b/dotfiles/config/i3pystatus/get_volume.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo $(if [[ $(echo $(pacmd list | grep "active port") | cut -d" " -f3 | cut -d"<" -f2 | cut -d">" -f1) == "analog-output-lineout" ]]; then echo "Headphones"; elif [[ $(echo $(pacmd list | grep "active port") | cut -d" " -f3 | cut -d"<" -f2 | cut -d">" -f1) == "analog-output-headphones" ]]; then echo "Line Out"; fi)