Base scripts for Artix and startx config.

This commit is contained in:
ikolokolnikov committed 2026-09-15 16:09:40 -07:00
1 parent 9d2999d5c0
commit 459bfff2ca
8 files changed
+218

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
for battery in /sys/class/power_supply/BAT?*; do
status=""
case "$(cat "$battery/status" 2>&1)" in
"Full") status="=" ;;
"Charging") status="+" ;;
"Discharging") status="-" ;;
"Not charging") status="/" ;;
"Unknown") status="?" ;;
*) exit 1 ;;
esac
capacity="$(cat "$battery/capacity" 2>&1)"
warn=""
[ "$capacity" -le 25 ] && warn="!"
printf "%s[%s]%s" "$warn" "$capacity" "$status"
done