sway_volume: autoformat
This commit is contained in:
parent
209195e8a9
commit
f2d5c90151
1 changed files with 9 additions and 9 deletions
|
@ -8,7 +8,6 @@ VOL1="●"
|
|||
# echo -e '\u25cc'
|
||||
VOL2="◌"
|
||||
|
||||
|
||||
function getProgressString() {
|
||||
ITEMS="$1" # The total number of items(the width of the bar)
|
||||
FILLED_ITEM="$2" # The look of a filled item
|
||||
|
@ -24,6 +23,7 @@ function getProgressString() {
|
|||
msg=${msg}$(printf "%${NOT_FILLED_ITEMS}s" | sed "s| |${NOT_FILLED_ITEM}|g")
|
||||
echo "$msg"
|
||||
}
|
||||
|
||||
function notify() {
|
||||
VOLUME=$(pactl list sinks | grep "Name: $SINK" -A 8 | grep -oE '[0-9]*%' | head -n 1 | sed 's/%//')
|
||||
MUTE=$(pactl list sinks | grep "Name: $SINK" -A 8 | grep 'Mute:' | cut -d " " -f 2)
|
||||
|
@ -44,7 +44,7 @@ function notify() {
|
|||
else
|
||||
ICON=$ICON_PATH/audio-volume-high.svg
|
||||
TITLE="${VOLUME}%"
|
||||
fi
|
||||
fi
|
||||
# $NOTIFY_APP -i $ICON -a "Volume" "$TEXT"
|
||||
$NOTIFY_APP -i $ICON "$TITLE" "$(getProgressString 10 "$VOL1" "$VOL2" $VOLUME)"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue