Skip to content

Commit deeb542

Browse files
Merge pull request #1 from avinashkranjan/master
Updating the forked repository.
2 parents cd99401 + 6914085 commit deeb542

File tree

29 files changed

+1557
-1
lines changed

29 files changed

+1557
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import psutil
2+
from plyer import notification
3+
import time
4+
#From psutil we import sensors battery class which gives us battery percentage
5+
threshold = int(input('Enter the threshold: '))
6+
7+
battery = psutil.sensors_battery()
8+
percent = battery.percent
9+
10+
while(True):
11+
battery = psutil.sensors_battery()
12+
cur_per = battery.percent
13+
change = cur_per - percent
14+
diff = abs(change)
15+
#We calculate the change in the battery and show notification if battery level increases or decreases
16+
if(diff >= threshold):
17+
notification.notify(
18+
title = "Battery Percentage",
19+
message = str(cur_per) + "% Battery Remaining",
20+
timeout = 5
21+
)
22+
percent = cur_per
23+
continue

Battery-Notification/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This is a Python Script which shows the battery percentage left
2+
3+
## Requirements
4+
5+
For this script to run you need to have psutil and plyer packages installed
6+
7+
Run the command in terminal to install package
8+
9+
```
10+
$ pip install psutil
11+
```
12+
```
13+
$ pip install plyer
14+
```
15+
Run the program using command
16+
17+
```
18+
$ python Battery-Notification.py
19+
```

Bubble Shooter Game/Arrow.png

498 Bytes
Loading
2.4 MB
Binary file not shown.

Bubble Shooter Game/Readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## How to play Bubble shooter game
2+
- In order to shoot the bubbles click on the space bar.
3+
- Any 3 consecutive same color bubbles.
4+
- Control the arrow with left, right and up arrow keys.
4.04 MB
Binary file not shown.

Bubble Shooter Game/bgmusic.ogg

1.2 MB
Binary file not shown.
295 KB
Loading

0 commit comments

Comments
 (0)