[m] Fixing Eww Scripts

This commit is contained in:
soraefir 2024-02-18 10:19:51 +01:00
parent f6a80afbd8
commit a8b9dd2475
Signed by: sora
GPG Key ID: A362EA0491E2EEA0
6 changed files with 10 additions and 10 deletions

View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env zsh
function get_time_ms {
date -u +%s%3N

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env zsh
icons=("󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹")
num_icons=$(awk -v n="${#icons[@]}" 'BEGIN{print 100 / n}')
@ -11,7 +11,7 @@ geticon() {
status() {
if [ "$STATE" = "Charging" ]; then
echo -n "charging"
echo -n "Charging"
if [ "$RATE" -gt 0 ]; then
echo ", $(gettime) left"
@ -21,7 +21,7 @@ status() {
elif [ "$STATE" = "Discharging" ]; then
echo "$(gettime)h left"
else
echo "fully charged"
echo "Fully Charged"
fi
}
@ -39,9 +39,9 @@ gettime() {
if [ "$RATE" -gt 0 ]; then
if [ "$STATE" = "Discharging" ]; then
EX=$(($NOW / $RATE))
EX=$(( ($NOW*1.0) / $RATE))
else
EX=$(( ($FULL - $NOW) / $RATE))
EX=$(( (($FULL - $NOW)*1.0) / $RATE))
fi
date -u -d@"$(awk -v ex="$EX" 'BEGIN{print ex * 3600}')" +%H:%M
fi

View File

@ -1 +1 @@
#!/usr/bin/env bash
#!/usr/bin/env zsh

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash
#!/usr/bin/env zsh
amdgpu_top -J -s 5000 | sed 's/ //g'

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env zsh
total="$(free --si | rg Mem | awk '{print $2}')"