aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnotify.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/notify.py b/notify.py
index 6a76bbd..8775905 100755
--- a/notify.py
+++ b/notify.py
@@ -4,14 +4,13 @@ import berserk, subprocess
# Change ACCESS TOKEN according to your need
ACCESS_TOKEN=""
-
+NOTIFY_DURATION=5*60 # Notification duration in seconds
# Notify using notify-send
def notify_send(summary, message):
- subprocess.Popen(['notify-send', '-u', 'critical','-t', '99999999', summary, message])
+ subprocess.Popen(['notify-send', '-u', 'critical','-t', str(NOTIFY_DURATION*1000), summary, message])
return
-
# Fetch data and notify
session = berserk.TokenSession(ACCESS_TOKEN)
client = berserk.Client(session=session)