delay sending notification

This commit is contained in:
piotr 2022-04-27 03:37:49 +02:00
parent dd059f50cd
commit 4bf0cb8d4a

View File

@ -3,6 +3,7 @@
import json
import os
import subprocess
import time
from nwg_shell.__about__ import __version__
@ -60,8 +61,9 @@ def main():
if last_upgrade is not None and ver is not None:
if last_upgrade < ver and __version__ in need_upgrade:
time.sleep(1)
subprocess.Popen(
'exec {}'.format("sleep 1 && notify-send -i /usr/share/pixmaps/nwg-shell.svg 'Upgrade to nwg-shell v{} "
'exec {}'.format("notify-send -i /usr/share/pixmaps/nwg-shell.svg 'Upgrade to nwg-shell v{} "
"available' 'Run \"nwg-shell-installer -u\" in terminal.'".format(__version__)),
shell=True)
print("Upgrade to {} needed. Run 'nwg-shell-installer -u'.".format(__version__))