mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
don't blink when charging
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
Former-commit-id: 494de74831
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user