Fixes icons for notifications
This commit is contained in:
parent
4024086cee
commit
cc918502b1
6 changed files with 25 additions and 21 deletions
|
|
@ -19,13 +19,13 @@ get_volume() {
|
|||
get_icon() {
|
||||
current=$(get_volume)
|
||||
if [[ "$current" == "Muted" ]]; then
|
||||
echo "$iDIR/audio-volume-muted.svg"
|
||||
echo "audio-volume-muted"
|
||||
elif [[ "${current%\%}" -le 30 ]]; then
|
||||
echo "$iDIR/audio-volume-low.svg"
|
||||
echo "audio-volume-low"
|
||||
elif [[ "${current%\%}" -le 60 ]]; then
|
||||
echo "$iDIR/audio-volume-medium.svg"
|
||||
echo "audio-volume-medium"
|
||||
else
|
||||
echo "$iDIR/audio-volume-high.svg"
|
||||
echo "audio-volume-high"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ dec_volume() {
|
|||
# Toggle Mute
|
||||
toggle_mute() {
|
||||
if [ "$(pamixer --get-mute)" == "false" ]; then
|
||||
pamixer -m && notify-send -e -u low -i "$iDIR/audio-volume-muted.svg" " Mute"
|
||||
pamixer -m && notify-send -e -u low -i "audio-volume-muted" " Mute"
|
||||
elif [ "$(pamixer --get-mute)" == "true" ]; then
|
||||
pamixer -u && notify-send -e -u low -i "$(get_icon)" " Volume:" " Switched ON"
|
||||
fi
|
||||
|
|
@ -69,18 +69,18 @@ toggle_mute() {
|
|||
# Toggle Mic
|
||||
toggle_mic() {
|
||||
if [ "$(pamixer --default-source --get-mute)" == "false" ]; then
|
||||
pamixer --default-source -m && notify-send -e -u low -i "$iDIR/microphone-mute.png" " Microphone:" " Switched OFF"
|
||||
pamixer --default-source -m && notify-send -e -u low -i "microphone-mute" " Microphone:" " Switched OFF"
|
||||
elif [ "$(pamixer --default-source --get-mute)" == "true" ]; then
|
||||
pamixer -u --default-source u && notify-send -e -u low -i "$iDIR/microphone.png" " Microphone:" " Switched ON"
|
||||
pamixer -u --default-source u && notify-send -e -u low -i "microphone" " Microphone:" " Switched ON"
|
||||
fi
|
||||
}
|
||||
# Get Mic Icon
|
||||
get_mic_icon() {
|
||||
current=$(pamixer --default-source --get-volume)
|
||||
if [[ "$current" -eq "0" ]]; then
|
||||
echo "$iDIR/microphone-mute.png"
|
||||
echo "microphone-mute"
|
||||
else
|
||||
echo "$iDIR/microphone.png"
|
||||
echo "microphone"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue