[yambar] Adjust meter bg, fix full battery, tweak temp

This commit is contained in:
Midgard 2022-09-11 17:09:21 +02:00
parent 8945fb6acf
commit 67cfe269c7
Signed by untrusted user who does not match committer: midgard
GPG key ID: 511C112F1331BBB4
2 changed files with 10 additions and 2 deletions

View file

@ -2,7 +2,7 @@ col_fg: &col_fg "dfdfdfff"
col_fg_alt: &col_fg_alt "777777ff" col_fg_alt: &col_fg_alt "777777ff"
col_fg_caution: &col_fg_caution "bd2c40ff" col_fg_caution: &col_fg_caution "bd2c40ff"
col_fg_alert: &col_fg_alert "ff4e4eff" col_fg_alert: &col_fg_alert "ff4e4eff"
col_meter_bg: &col_meter_bg "3a3a3aaa" col_meter_bg: &col_meter_bg "666666aa"
col_chg: &col_chg "dddd77ff" col_chg: &col_chg "dddd77ff"
col_visible_ws: &col_visible_ws "42429cff" col_visible_ws: &col_visible_ws "42429cff"
@ -419,6 +419,10 @@ bar:
ramp: ramp:
tag: capacity tag: capacity
items: *battery_range_charging items: *battery_range_charging
state == full:
ramp:
tag: capacity
items: *battery_range_charging
state == not charging: state == not charging:
- ramp: - ramp:
tag: capacity tag: capacity

View file

@ -2,13 +2,17 @@
temp="$( (cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null | maths max | tr -d $'\n'; echo " / 1000") | bc)" temp="$( (cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null | maths max | tr -d $'\n'; echo " / 1000") | bc)"
rpm="$(sudo fan_control rpm 1)" rpm="$(sudo fan_control rpm 1)"
if test "$temp" -ge 60 && test "${rpm% RPM}" -lt 100; then
rpm="$(sudo fan_control rpm 1)"
fi
echo "temp|int|$temp" echo "temp|int|$temp"
echo "rpm|int|${rpm% RPM}" echo "rpm|int|${rpm% RPM}"
if test "$temp" -ge 90; then if test "$temp" -ge 90; then
status=alert status=alert
elif test "$temp" -ge 80; then elif test "$temp" -ge 80; then
status=caution status=caution
elif test "$temp" -gt 57 || test "${rpm% RPM}" -gt 3000; then elif test "$temp" -ge 60 || test "${rpm% RPM}" -gt 3000; then
status=active status=active
else else
status=normal status=normal