mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
added nightlight status indicator
Based on feedback from @pineapples5972 in this comment: https://github.com/LukeSmithxyz/voidrice/pull/1181#issuecomment-1233816668
This commit is contained in:
parent
c330624dec
commit
c5bfdcba4c
@ -33,6 +33,9 @@ for battery in /sys/class/power_supply/BAT?*; do
|
||||
capacity="$(cat "$battery/capacity" 2>&1)"
|
||||
# Will make a warn variable if discharging and low
|
||||
[ "$status" = "🔋" ] && [ "$capacity" -le 25 ] && warn="❗"
|
||||
# Show nightlight status
|
||||
colortemp="$(xsct | cut -d' ' -f5)"
|
||||
[ "$colortemp" -lt 6500 ] && night=" 🌙"
|
||||
# Prints the info
|
||||
printf "%s%s%d%%" "$status" "$warn" "$capacity"; unset warn
|
||||
printf "%s%s%d%%%s" "$status" "$warn" "$capacity" "$night"; unset warn
|
||||
done && printf "\\n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user