First Working State
This commit is contained in:
		
							parent
							
								
									bf3259767b
								
							
						
					
					
						commit
						0ac946facd
					
				|  | @ -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) | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue