Switch to built-in network widget.

This commit is contained in:
Bartek Stalewski 2022-12-17 00:47:11 +01:00
parent 807e2e6d54
commit 96f0e639bc
2 changed files with 4 additions and 21 deletions

View File

@ -1,15 +0,0 @@
#!/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

View File

@ -148,18 +148,16 @@ screens = [
update_interval=1, update_interval=1,
cmd="sb-mail", cmd="sb-mail",
), ),
widget.GenPollCommand(
background='#770000',
foreground='#ffffff',
update_interval=1,
cmd="sb-network",
),
widget.GenPollCommand( widget.GenPollCommand(
background='#770000', background='#770000',
foreground='#ffffff', foreground='#ffffff',
update_interval=1, update_interval=1,
cmd="sb-volume", cmd="sb-volume",
), ),
widget.Wlan(
format='',
disconnected_message="<span background='#770000' foreground='#ffffff' line_height='512'>no wifi</span>",
),
widget.Battery( widget.Battery(
format='{char} {percent:2.0%}', format='{char} {percent:2.0%}',
charge_char='\uf077', charge_char='\uf077',