diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2020-05-16 11:08:47 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2020-05-16 11:08:47 +0200 |
| commit | 81a1645bde6774dd149a360382ef52a1a3fe60ee (patch) | |
| tree | 5780d298dc648e0ceb9e0d1c6aff5068fd61abf9 | |
| parent | ba6a3ff28dc21fbd4e77306ab9fbd881421192aa (diff) | |
Change notification duration
| -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) |
