I've deleted the wrong script.
This commit is contained in:
parent
c7c43b7c47
commit
d10cc92faa
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
|
||||
down) printf "no wifi" ;;
|
||||
up) [ -n "$(ip address show dev wlan0 | grep 'inet ')" ] || printf "no ip" ;;
|
||||
esac
|
15
_desktop/_scripts/sb-volume
Executable file
15
_desktop/_scripts/sb-volume
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $1 ]; then
|
||||
case $1 in
|
||||
inc) pactl set-sink-volume @DEFAULT_SINK@ +5%;;
|
||||
dec) pactl set-sink-volume @DEFAULT_SINK@ -5%;;
|
||||
esac
|
||||
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk -F' / *' '{print $2}')
|
||||
notify-send -t 2000 -u low "volume: $volume"
|
||||
else
|
||||
mic=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F' / ' '{print $2}' | tr -d '%')
|
||||
[ $(pactl get-source-mute @DEFAULT_SOURCE@ | awk -F': ' '{print $2}') = yes ] || [ "$mic" -eq 0 ] && micmute="\uf131" || micmute=""
|
||||
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F' / ' '{print $2}' | tr -d '%')
|
||||
[ $(pactl get-sink-mute @DEFAULT_SINK@ | awk -F': ' '{print $2}') = yes ] || [ "$vol" -eq 0 ] && printf "${micmute} \ufc5d" || printf "$micmute"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user