diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2025-09-25 10:53:09 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2025-09-25 10:53:09 +0530 |
| commit | a65f1cc093887dd9276af2a332b2cee0b9c67241 (patch) | |
| tree | cece2fd925834f3c292680c8a208a7fe893fb356 /hypr/battery_warning.py | |
| parent | 9c4bc6622794e289ebd98ad1217bfe531dd781d6 (diff) | |
batter notification fixed
Diffstat (limited to 'hypr/battery_warning.py')
| -rw-r--r-- | hypr/battery_warning.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/hypr/battery_warning.py b/hypr/battery_warning.py deleted file mode 100644 index 882e8dd..0000000 --- a/hypr/battery_warning.py +++ /dev/null @@ -1,18 +0,0 @@ -import psutil -import subprocess -import time - -WARNING_LEVEL = 30 -CRITICAL_LEVEL = 15 - -while True: - battery = psutil.sensors_battery() - percent = battery.percent - if battery.power_plugged: - pass # Optionally notify full - else: - if percent <= CRITICAL_LEVEL: - subprocess.run(['notify-send', '-u', 'critical', 'Very Low Battery', '-i', '/home/aargh/.config/waybar/battery_low.png']) - elif percent <= WARNING_LEVEL: - subprocess.run(['notify-send', '-u', 'normal', 'Low Battery', '-i', '/home/aargh/.config/waybar/battery_low.png']) - time.sleep(5) |
