aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2020-05-16 11:08:47 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2020-05-16 11:08:47 +0200
commit81a1645bde6774dd149a360382ef52a1a3fe60ee (patch)
tree5780d298dc648e0ceb9e0d1c6aff5068fd61abf9
parentba6a3ff28dc21fbd4e77306ab9fbd881421192aa (diff)
Change notification duration
-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)