all repos

dotfiles @ e3a3ab31d44647f5166f7ec7330a74adc0635f8e

i use rach linux btw
3 files changed, 6 insertions(+), 7 deletions(-)
bin: update scripts
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2024-11-14 21:26:30 +0200
Parent: 61a2707
M bin/ex

    
  
M config/hypr/bat.sh
ยทยทยท
        3
        3
         # the purpose of the script is to notify when battery percentage is low

      
        4
        4
         

      
        5
        5
         while true; do

      
        6
        
        -    lvl=$(cat /sys/class/power_supply/BAT0/capacity)

      
        7
        
        -    if [ "$lbl" -le 30 ]; then

      
        8
        
        -        notify-send --urgency=CRITICAL "Battery Low" "Consider plugging cable in"

      
        9
        
        -        sleep 1200

      
        10
        
        -    else

      
        11
        
        -        sleep 120

      
        12
        
        -    fi

      
        
        6
        +  if [[ "$(cat /sys/class/power_supply/BAT0/capacity)" -le 30 ]]; then

      
        
        7
        +    notify-send --urgency=CRITICAL "Battery Low" "Consider plugging cable in"

      
        
        8
        +    sleep 1200

      
        
        9
        +  else

      
        
        10
        +    sleep 120

      
        
        11
        +  fi

      
        13
        12
         done