diff --git a/systrayUpdater.py b/systrayUpdater.py index 20a86aa..76986dc 100755 --- a/systrayUpdater.py +++ b/systrayUpdater.py @@ -1,10 +1,5 @@ #!/usr/bin/env python -""" -Current status is: kinda broken -Need to complete dynamic labels for available updates -""" - # Get needed modules import yaml import subprocess @@ -39,7 +34,13 @@ def update(): cmd = [ term, opt, 'sudo', 'pacman', '-Syu'] subprocess.Popen(cmd) -# Initially populate available updates count +# Sets new text for available updates +def newText(): + count() + option1.setText(avail) + tray.setToolTip(avail) + +# Initially populate available updates count() app = QApplication([]) @@ -61,11 +62,6 @@ option1.triggered.connect(update) option1.triggered.connect(newText) menu.addAction(option1) -def newText(event): - count() - option1.setText(avail) - tray.setToolTip(avail) - # Set up timer to update count timer = QTimer() timer.timeout.connect(newText) diff --git a/trayupdater.desktop b/trayupdater.desktop index f237209..d2b84fc 100644 --- a/trayupdater.desktop +++ b/trayupdater.desktop @@ -1,8 +1,7 @@ [Desktop Entry] Name=Tray Updater -#Version=0.1 -Icon=/home/ez/NextCloud/Projects/Python/systrayUpdater/blue-logo.png -Exec=python /home/ez/NextCloud/Projects/Python/systrayUpdater/first.py +Icon=/home/Git/systrayUpdater/blue-logo.png +Exec=python /home/Git/systrayUpdater/first.py Terminal=false Type=Application Categories=Utility