diff options
| -rwxr-xr-x | notify.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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) |
