Skip to content

Commit

Permalink
deleted: PKGBUILD
Browse files Browse the repository at this point in the history
	modified:   setup.py
	modified:   src/lib/conf.py
	modified:   src/lib/pactray.py
	modified:   src/lib/tray.py
	modified:   src/lib/updates.py
	new file:   src/scripts/pactray
  • Loading branch information
thermionix committed Sep 14, 2015
1 parent be0af09 commit 4cdb5c7
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 39 deletions.
19 changes: 0 additions & 19 deletions PKGBUILD

This file was deleted.

21 changes: 11 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
from distutils.core import setup

setup(name='pactray',
version='0.1',
license='GPL3',
description='a systray application that notifies that user about new updates for Arch Linux',
author=['Thermionix'],
author_email=['[email protected]'],
url='https://github.com/Thermionix/pactray',
package_dir={'pactray':'src/lib/'},
packages=['pactray'],
data_files=[('share/pactray/', ['src/share/archlogo.png', 'src/share/archlogo.svg']),
('share/applications', ['src/pactray.desktop'])]
version='0.1',
license='GPL3',
description='a systray application that notifies that user about new updates for Arch Linux',
author=['Thermionix'],
author_email=['[email protected]'],
url='https://github.com/Thermionix/pactray',
package_dir={'pactray':'src/lib/'},
packages=['pactray'],
data_files=[('share/pactray/', ['src/share/archlogo.png', 'src/share/archlogo.svg']),
('share/applications', ['src/pactray.desktop'])],
scripts=['src/scripts/pactray']
)

3 changes: 2 additions & 1 deletion src/lib/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ class Configuration:
conf_options = {'global' : {
'update_interval': '120',
'notification_timeout': '10',
'icon_file': (path.join(path.abspath(path.curdir),"archlogo.png"))
'icon_file': '/usr/share/pactray/archlogo.png'
}}
# (path.join(path.abspath(path.curdir),''))
# pacman_check_cmd ["/usr/bin/checkupdates"]
# aur_check_cmd ["/usr/bin/cower","-u"]
# aur_output_regex
Expand Down
15 changes: 9 additions & 6 deletions src/lib/pactray.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#!/usr/bin/env python

import os
import sys
from gi.repository import Gtk, GLib
from updates import UpdateChecker
from tray import TrayIcon
from conf import Configuration
from pactray.updates import UpdateChecker
from pactray.tray import TrayIcon
from pactray.conf import Configuration

if __name__ == '__main__':
def main(args=None):
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)

trayIcon = TrayIcon()
checker = UpdateChecker()

#update_interval = int(Configuration().read().get('global', 'update_interval')) * 60
update_interval = 5 * 60
update_interval = int(Configuration().read().get('global', 'update_interval')) * 60

def check():
checker.run_check(trayIcon)
Expand All @@ -24,3 +24,6 @@ def check():
GLib.timeout_add_seconds(update_interval, check)

Gtk.main()

if __name__ == '__main__':
main()
4 changes: 2 additions & 2 deletions src/lib/tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from gi.repository import Gtk, Notify
import subprocess
from conf import Configuration
from updates import UpdateChecker
from pactray.conf import Configuration
from pactray.updates import UpdateChecker

class Notifications():
def __init__(self):
Expand Down
2 changes: 1 addition & 1 deletion src/lib/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import subprocess
import os
from conf import Configuration
from pactray.conf import Configuration

class UpdateChecker:
updatesList=[]
Expand Down
1 change: 1 addition & 0 deletions src/scripts/pactray

0 comments on commit 4cdb5c7

Please sign in to comment.