fix: sbar error messages

This commit is contained in:
AngeD 2023-04-22 19:15:42 +02:00
parent 4d963efdb0
commit 87ef79fbd2
5 changed files with 7 additions and 6 deletions

@ -1 +1 @@
Subproject commit eddaef928c1e1dd79a96f5db45f2fd7f2efe7ea0
Subproject commit cf95480e876ef7699bf08a1d02aa0ae3f4d5f353

@ -1 +1 @@
Subproject commit dd640f6cfb0e370cfd3db389f04b172508848bd3
Subproject commit d20f23c0d6810c8754737428771eef40bd1056a7

@ -1 +1 @@
Subproject commit cdc45ac6bad52d95802b54e8a6d4f7aaa163edc5
Subproject commit 57d1a5843742a180be9a3a1d1c652a7d22709691

@ -1 +1 @@
Subproject commit 673b9fc3317d48a169fe612575186b3eb1a42a13
Subproject commit 5d3e86e2a48adf7a308773f8f1b725d187c7c5ef

View File

@ -47,13 +47,14 @@ update_wlp() {
local ssid; ssid="$(nmcli -t -f name,device connection show --active | grep wlp | cut -d: -f1)"
[ -z "$ssid" ] && wlp='⚠' && return
[ -z "$sig" ] && sig=0
# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/libnmc-base/nm-client-utils.c#L628
{ [ "$sig" -gt 5600 ] && wlp="▂▄▆█ $ssid"; } ||
{ [ "$sig" -gt 3850 ] && wlp="▂▄▆_ $ssid"; } ||
{ [ "$sig" -gt 1650 ] && wlp="▂▄__ $ssid"; } ||
{ [ "$sig" -gt 275 ] && wlp="▂___ $ssid"; } ||
{ wlp="____ $ssid"; }
{ wlp="____ $ssid"; }
}
update_time() {
@ -68,7 +69,7 @@ update_time() {
#}
# modules that don't update on their own need to be run at the start for getting their initial value
while [ -z "$(wpctl get-volume '@DEFAULT_AUDIO_SINK@')" ]; do
while [ -z "$(wpctl get-volume '@DEFAULT_AUDIO_SINK@' 2> /dev/null)" ]; do
sleep 1
done
update_vol