mirror of
https://github.com/Keyitdev/dotfiles.git
synced 2026-09-24 01:52:09 +00:00
30 lines
674 B
Bash
Executable File
30 lines
674 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 "Speakers" \
|
|
"Speakers" \
|
|
"Volume: $cur_vol%" \
|
|
-r 100 \
|
|
-i $dir_icons/volume.svg
|
|
fi
|
|
if [ "$cur_vol" -gt "$vol_quiet" ] && [ "$cur_vol" -le "$vol_loud" ]; then
|
|
dunstify -a "Speakers" \
|
|
"Speakers" \
|
|
"Volume: $cur_vol%" \
|
|
-r 100 \
|
|
-i $dir_icons/volume-1.svg
|
|
fi
|
|
if [ "$cur_vol" -gt "$vol_loud" ]; then
|
|
dunstify -a "Speakers" \
|
|
"Speakers" \
|
|
"Volume: $cur_vol%" \
|
|
-r 100 \
|
|
-i $dir_icons/volume-2.svg
|
|
fi |