We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d86656 commit 5873386Copy full SHA for 5873386
Battery-Notification/Battery-Notification.py
@@ -20,18 +20,4 @@
20
timeout = 5
21
)
22
percent = cur_per
23
- battery = psutil.sensors_battery()
24
- percent = battery.percent
25
- time.sleep(60*2)
26
27
- cur_per = battery.percent
28
- change = cur_per - percent
29
- diff = abs(change)
30
- #We calculate the change in the battery and show notification if battery level increases or decreases
31
- if(diff >= threshold):
32
- notification.notify(
33
- title = "Battery Percentage",
34
- message = str(percent) + "% Battery Remaining",
35
- timeout = 5
36
- )
37
continue
0 commit comments