Files

30 lines
692 B
Bash
Executable File

#!/bin/sh
dir_icons="/usr/local/bin/icons"
cur_vol=$(awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget Master) | sed 's/%//g')
vol_quiet=33
vol_loud=66
if [ "$cur_vol" -le "$vol_quiet" ]; then
dunstify -a "Volume" \
"Volume" \
"Current volume is $cur_vol%" \
-r 100 \
-i $dir_icons/volume.svg
fi
if [ "$cur_vol" -gt "$vol_quiet" ] && [ "$cur_vol" -le "$vol_loud" ]; then
dunstify -a "Volume" \
"Volume" \
"Current volume is $cur_vol%" \
-r 100 \
-i $dir_icons/volume-1.svg
fi
if [ "$cur_vol" -gt "$vol_loud" ]; then
dunstify -a "Volume" \
"Volume" \
"Current volume is $cur_vol%" \
-r 100 \
-i $dir_icons/volume-2.svg
fi