don't blink when charging

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>

Former-commit-id: 494de74831
This commit is contained in:
Hadi
2025-05-20 22:02:50 +02:00
parent 15f4554703
commit 8c4162b885

View File

@@ -13,7 +13,8 @@ let
set_keyboard_backlight ${config.lib.stylix.colors.base0D} set_keyboard_backlight ${config.lib.stylix.colors.base0D}
while true; do while true; do
BATTERY_LEVEL=$(cat /sys/class/power_supply/BAT*/capacity) BATTERY_LEVEL=$(cat /sys/class/power_supply/BAT*/capacity)
if [[ $BATTERY_LEVEL -le 10 ]]; then IS_CHARGING=$(cat /sys/class/power_supply/BAT*/status)
if [[ $BATTERY_LEVEL -le 10 && $IS_CHARGING != "Charging" ]]; then
if [[ $state == "red" ]];then if [[ $state == "red" ]];then
state="white" state="white"
set_keyboard_backlight "000000" set_keyboard_backlight "000000"