scripts: Add unified volume bars to control scripts
`control-brightness` and `control-volume` both now have the exact same progress bar indicator. Additionally, by using the same dunst 'stack' they replace each other if invoked in quick succession, which I really like.
This commit is contained in:
parent
a6b3a973bb
commit
5ce6111f51
2 changed files with 10 additions and 5 deletions
|
|
@ -54,13 +54,16 @@ send_notification() {
|
|||
fi
|
||||
|
||||
vol="$(get_volume)"
|
||||
bar=$(seq -s "─" $((vol / 5)) | sed 's/[0-9]//g')
|
||||
|
||||
if [ "$vol" -eq 0 ] || [ "$(get_mute)" = "off" ]; then
|
||||
# Show the sound muted notification
|
||||
$notcmd -a "changeVolume" -u low -i audio-volume-muted "Volume muted"
|
||||
else
|
||||
# Show the volume notification
|
||||
$notcmd -a "changeVolume" -u low -i audio-volume-high \
|
||||
-h int:value:"$vol" "Volume: $vol%"
|
||||
-h int:value:"$vol" "Volume: $vol%
|
||||
$bar"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue