This commit is contained in:
2014-07-29 02:11:38 +02:00
parent 2a806ad7ae
commit fd7e96e5f9
4 changed files with 23 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ bindsym XF86AudioNext exec --no-startup-id mpc next
# font for window titles. ISO 10646 = Unicode
font pango:DejaVu Sans Mono 11
bindsym $mod+o exec --no-startup-id ~/.i3/scripts/monitor/monitor.sh
bindsym $mod+o exec --no-startup-id ~/development/projects/xautorandr/xautorandr.sh
# start i3bar to display a workspace bar (plus the system information i3status

View File

@@ -1,7 +1,10 @@
#!/bin/bash
# index of the sink. execute pactl list sinks to get a list
SINK=1
# name of the sink. execute pactl list sinks to get a list
SINKNAME="alsa_output.pci-0000_00_1b.0.analog-stereo"
# this is the worst
SINK=$(( $(pactl list sinks | grep "Name: " | grep -n "${SINKNAME}" | grep -o "^[[:digit:]]*") -1))
getvol() {
echo $(pactl list sinks | grep "^[[:space:]]*Volume" | head -n $(( $SINK + 1 )) | tail -n 1 | grep -o "[[:digit:]]*%" | head -n 1 | cut -d "%" -f 1)