floating_modifier $mod
# volumes
-bindsym $mod+plus exec amixer set Master 5%+ && notify-send " $(gvol) (+5%)"
-bindsym $mod+minus exec amixer set Master 5%- && notify-send " $(gvol) (-5%)"
-bindsym $mod+Shift+plus exec amixer set Capture 5%+ && notify-send " $(gvol Capture) (+5%)"
-bindsym $mod+Shift+minus exec amixer set Capture 5%- && notify-send " $(gvol Capture) (-5%)"
-bindsym $mod+backslash exec amixer set Master toggle && notify-send " $(gvol)"
-bindsym $mod+Shift+backslash exec amixer set Capture toggle && notify-send " $(gvol Capture)"
+bindsym $mod+plus exec notify-send " $(vol Master 5%+) (+5%)"
+bindsym $mod+minus exec notify-send " $(vol Master 5%-) (-5%)"
+bindsym $mod+backslash exec notify-send " $(vol Master toggle)"
+bindsym $mod+Shift+plus exec notify-send " $(vol Capture 5%+) (+5%)"
+bindsym $mod+Shift+minus exec notify-send " $(vol Capture 5%-) (-5%)"
+bindsym $mod+Shift+backslash exec notify-send " $(vol Capture toggle)"
# start a terminal
bindsym $mod+Return exec alacritty
+++ /dev/null
-#!/bin/sh
-# vol - get/set volume of alsa control using amixer
-# $1: control name (default is 'Master')
-# $2: set the volume to value (optional)
-
-amixer \
- $( [ -z "$2" ] && echo "get" || echo "set" ) \
- $( [ -z "$1" ] && echo "Master" || echo "$1" ) \
- "$2" \
- | sed -nE -e '/\[on\]/ { s/.*\[([0-9]+%)\].*/\1/; p; q }' \
- -e '/\[off\]/ { s/.*/MUTE/; p; q }'
--- /dev/null
+#!/bin/sh
+# vol - get/set volume of alsa control using amixer
+# $1: control name (default is 'Master')
+# $2: set the volume to value (optional)
+
+amixer \
+ $( [ -z "$2" ] && echo "get" || echo "set" ) \
+ $( [ -z "$1" ] && echo "Master" || echo "$1" ) \
+ "$2" \
+ | sed -nE -e '/\[on\]/ { s/.*\[([0-9]+%)\].*/\1/; p; q }' \
+ -e '/\[off\]/ { s/.*/MUTE/; p; q }'