Skip to content

Commit b0a8d06

Browse files
Merge pull request prathimacode-hub#327 from neelshah2409/main
Desktop Notification
2 parents 127fa71 + 0a5f014 commit b0a8d06

File tree

5 files changed

+33
-0
lines changed

5 files changed

+33
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Output images are given here.
42.4 KB
Loading
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Desktop Notification
2+
3+
## Short description of package/script:
4+
Here we can send a notification on desktop after particular time with the use of plyer and time library .We can customise title and message of the notification.So here we can simply send a notification to desktop ,here firstly using the notification method of plyer library we make the title and message of the notification and then using the time library we set the duration after which the notification will be sent.
5+
6+
## List out the libraries imported:
7+
plyer ,time
8+
9+
## Setup instructions
10+
Here the message and title and duration after which notification is to be send is to be customised in the script only and then run the program so notification will be popped.
11+
12+
13+
## Output:
14+
![output(desktop)](https://user-images.githubusercontent.com/71593494/122388764-d40ea500-cf8d-11eb-9043-8a630d3a211b.png)
15+
16+
## Author:
17+
Neel Shah
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import time
2+
from plyer import notification
3+
4+
if __name__ == "__main__":
5+
while True:
6+
notification.notify(
7+
#setting the title
8+
title="ALERT!!!",
9+
#seeting the message
10+
message="Take a break! It has been an hour!",
11+
#time for which notification will be shown
12+
timeout=10
13+
)
14+
time.sleep(3600)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Libraries used: time ,plyer

0 commit comments

Comments
 (0)