First Working State
This commit is contained in:
parent
bf3259767b
commit
0ac946facd
|
@ -1,10 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
|
||||||
Current status is: kinda broken
|
|
||||||
Need to complete dynamic labels for available updates
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Get needed modules
|
# Get needed modules
|
||||||
import yaml
|
import yaml
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -39,7 +34,13 @@ def update():
|
||||||
cmd = [ term, opt, 'sudo', 'pacman', '-Syu']
|
cmd = [ term, opt, 'sudo', 'pacman', '-Syu']
|
||||||
subprocess.Popen(cmd)
|
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()
|
count()
|
||||||
|
|
||||||
app = QApplication([])
|
app = QApplication([])
|
||||||
|
@ -61,11 +62,6 @@ option1.triggered.connect(update)
|
||||||
option1.triggered.connect(newText)
|
option1.triggered.connect(newText)
|
||||||
menu.addAction(option1)
|
menu.addAction(option1)
|
||||||
|
|
||||||
def newText(event):
|
|
||||||
count()
|
|
||||||
option1.setText(avail)
|
|
||||||
tray.setToolTip(avail)
|
|
||||||
|
|
||||||
# Set up timer to update count
|
# Set up timer to update count
|
||||||
timer = QTimer()
|
timer = QTimer()
|
||||||
timer.timeout.connect(newText)
|
timer.timeout.connect(newText)
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Tray Updater
|
Name=Tray Updater
|
||||||
#Version=0.1
|
Icon=/home/Git/systrayUpdater/blue-logo.png
|
||||||
Icon=/home/ez/NextCloud/Projects/Python/systrayUpdater/blue-logo.png
|
Exec=python /home/Git/systrayUpdater/first.py
|
||||||
Exec=python /home/ez/NextCloud/Projects/Python/systrayUpdater/first.py
|
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Utility
|
Categories=Utility
|
||||||
|
|
Loading…
Reference in New Issue