3 files changed,
3 insertions(+),
13 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2025-03-08 19:41:20 +0200
Parent:
02f23e3
D
config/hypr/bat.sh
··· 1 -#!/usr/bin/env bash 2 - 3 -# the purpose of the script is to notify when battery percentage is low 4 - 5 -while true; do 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 12 -done