aboutsummaryrefslogtreecommitdiff
path: root/hypr/battery_warning.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypr/battery_warning.py')
-rw-r--r--hypr/battery_warning.py18
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)