summaryrefslogtreecommitdiff
path: root/sisyphus.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-06-12 02:41:32 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-06-12 02:41:32 +0100
commitbc02c657543a7d2be99ffbec9d002d698941f56f (patch)
tree14c405f483dd8eeec607505fae5713b9a3b6788c /sisyphus.py
parent8551f92e8f3f0cb51162635004e7b5ef86fb3e3e (diff)
merge epkg into sisyphus : from now on sisyphus-cli will be the CLI frontend (old epkg) && sisyphus-gui will be the GUI frontend ;; the backend libsisyphus.sh will be ported to python as well
Diffstat (limited to 'sisyphus.py')
-rwxr-xr-xsisyphus.py106
1 files changed, 0 insertions, 106 deletions
diff --git a/sisyphus.py b/sisyphus.py
deleted file mode 100755
index b3b0f1f..0000000
--- a/sisyphus.py
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/python3
-import sys, subprocess
-from PyQt5 import QtCore, QtGui, QtWidgets, uic
-
-from accesories import Accesories
-from development import Development
-from games import Games
-from graphics import Graphics
-from internet import Internet
-from multimedia import Multimedia
-from office import Office
-from system import System
-from local import Local
-from everything import Everything
-
-class Sisyphus(QtWidgets.QMainWindow):
- def __init__(self):
- super(Sisyphus, self).__init__()
- uic.loadUi('ui/sisyphus.ui', self)
- self.centerOnScreen()
- self.show()
-
- self.package_search.clicked.connect(self.search_package)
- self.package_install.clicked.connect(self.install_package)
- self.package_uninstall.clicked.connect(self.uninstall_package)
- self.system_upgrade.clicked.connect(self.upgrade_system)
- self.orphans_remove.clicked.connect(self.remove_orphans)
-
- self.category_accesories.clicked.connect(self.accesories_category)
- self.category_development.clicked.connect(self.development_category)
- self.category_games.clicked.connect(self.games_category)
- self.category_graphics.clicked.connect(self.graphics_category)
- self.category_internet.clicked.connect(self.internet_category)
- self.category_multimedia.clicked.connect(self.multimedia_category)
- self.category_office.clicked.connect(self.office_category)
- self.category_system.clicked.connect(self.system_category)
- self.category_local.clicked.connect(self.local_category)
- self.category_everything.clicked.connect(self.everything_category)
-
- def centerOnScreen (self):
- resolution = QtWidgets.QDesktopWidget().screenGeometry()
- self.move((resolution.width() / 2) - (self.frameSize().width() / 2),
- (resolution.height() / 2) - (self.frameSize().height() / 2))
-
- def search_package(self):
- pkgname = self.input.text()
- subprocess.Popen(['xterm', '-hold', '-e', 'epkg', 'search'] + pkgname.split())
-
- def install_package(self):
- pkgname = self.input.text()
- subprocess.Popen(['xterm', '-e', 'epkg', 'autoinstall'] + pkgname.split())
-
- def uninstall_package(self):
- pkgname = self.input.text()
- subprocess.Popen(['xterm', '-e', 'epkg', 'autoremove'] + pkgname.split())
-
- def upgrade_system(self):
- subprocess.Popen(['xterm', '-e', 'epkg', 'autoupgrade'])
-
- def remove_orphans(self):
- subprocess.Popen(['xterm', '-e', 'epkg', 'autoclean'])
-
- def accesories_category(self):
- self.window = Accesories()
- self.window.show()
-
- def development_category(self):
- self.window = Development()
- self.window.show()
-
- def games_category(self):
- self.window = Games()
- self.window.show()
-
- def graphics_category(self):
- self.window = Graphics()
- self.window.show()
-
- def internet_category(self):
- self.window = Internet()
- self.window.show()
-
- def multimedia_category(self):
- self.window = Multimedia()
- self.window.show()
-
- def office_category(self):
- self.window = Office()
- self.window.show()
-
- def system_category(self):
- self.window = System()
- self.window.show()
-
- def local_category(self):
- self.window = Local()
- self.window.show()
-
- def everything_category(self):
- self.window = Everything()
- self.window.show()
-
-if __name__ == '__main__':
- app = QtWidgets.QApplication(sys.argv)
- window = Sisyphus()
- sys.exit(app.exec_())