From a65f1cc093887dd9276af2a332b2cee0b9c67241 Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Thu, 25 Sep 2025 10:53:09 +0530 Subject: batter notification fixed --- hypr/battery_warning.py | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 hypr/battery_warning.py (limited to 'hypr/battery_warning.py') 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) -- cgit v1.2.3