delay sending notification

This commit is contained in:
piotr 2022-04-27 03:34:06 +02:00
parent 31631f5c22
commit dd059f50cd

View File

@ -60,9 +60,10 @@ def main():
if last_upgrade is not None and ver is not None:
if last_upgrade < ver and __version__ in need_upgrade:
"""subprocess.Popen(
'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)"""
subprocess.Popen(
'exec {}'.format("sleep 1 && 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__))
else:
print("No upgrade needed.")