mirror of
https://github.com/simbelmas/gotify-dunst.git
synced 2026-01-26 14:46:28 +01:00
2
main.py
2
main.py
@@ -56,7 +56,7 @@ def get_picture(appid):
|
|||||||
|
|
||||||
def send_notification(message):
|
def send_notification(message):
|
||||||
m = json.loads(message)
|
m = json.loads(message)
|
||||||
if 1 <= m['priority'] <= 3:
|
if m['priority'] <= 3:
|
||||||
subprocess.Popen(['notify-send', m['title'], m['message'], "-u", "low", "-i", get_picture(m['appid'])])
|
subprocess.Popen(['notify-send', m['title'], m['message'], "-u", "low", "-i", get_picture(m['appid'])])
|
||||||
if 4 <= m['priority'] <= 7:
|
if 4 <= m['priority'] <= 7:
|
||||||
subprocess.Popen(['notify-send', m['title'], m['message'], "-u", "normal", "-i", get_picture(m['appid'])])
|
subprocess.Popen(['notify-send', m['title'], m['message'], "-u", "normal", "-i", get_picture(m['appid'])])
|
||||||
|
|||||||
Reference in New Issue
Block a user