[m] Fixing Eww Scripts

This commit is contained in:
soraefir 2024-02-18 10:13:33 +01:00
parent 98da2a2673
commit f6a80afbd8
Signed by: sora
GPG Key ID: A362EA0491E2EEA0
3 changed files with 5 additions and 3 deletions

View File

@ -36,6 +36,7 @@
:visible {battery.visible}
:style "color: ${battery.color};"
:thickness 6
:tooltip "${battery.status}"
(label :class "icon-text" :text "B"))
)
)

View File

@ -26,7 +26,8 @@ function gen_wifi() {
icon=${icons[$level]}
ip="-"
class="net-connected"
name=printf wpa_cli status | grep \^ssid= | sed 's/ssid=//g'
name_raw=$(wpa_cli status | grep \^ssid= | sed 's/ssid=//g')
name=$(printf "%s" $name_raw)
}
function gen_ethernet() {

View File

@ -39,9 +39,9 @@ gettime() {
if [ "$RATE" -gt 0 ]; then
if [ "$STATE" = "Discharging" ]; then
EX="$NOW / $RATE"
EX=$(($NOW / $RATE))
else
EX="($FULL - $NOW) / $RATE"
EX=$(( ($FULL - $NOW) / $RATE))
fi
date -u -d@"$(awk -v ex="$EX" 'BEGIN{print ex * 3600}')" +%H:%M
fi