summaryrefslogtreecommitdiff
path: root/libsisyphus.sh
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2016-12-24 13:54:04 +0000
committerV3n3RiX <venerix@redcorelinux.org>2016-12-24 13:54:04 +0000
commite29bad9d89695116525de1afd362ff23a9ae77a5 (patch)
treede3f9346645f64c8090e26c9464d949937aec144 /libsisyphus.sh
parent1464e6b615b555d66be18abf119032e5c0d38eaa (diff)
modularize user interfaces
Diffstat (limited to 'libsisyphus.sh')
-rwxr-xr-xlibsisyphus.sh96
1 files changed, 96 insertions, 0 deletions
diff --git a/libsisyphus.sh b/libsisyphus.sh
new file mode 100755
index 0000000..41e6b43
--- /dev/null
+++ b/libsisyphus.sh
@@ -0,0 +1,96 @@
+#!/usr/bin/env bash
+
+# export yad worker variable
+export local showdialog="yad --title "sisyphus" --text-info --width 800 --height 600 --center --no-buttons --on-top --sticky --fixed --skip-taskbar --listen --tail &"
+
+# import user interfaces
+source accesoriesui.sh
+source gamesui.sh
+source graphicsui.sh
+source internetui.sh
+source multimediaui.sh
+source officeui.sh
+source systemui.sh
+
+# create main user interface
+export local mainui='
+<window title="Sisyphus - A simple Epkg GUI" window-position="1" icon-name="gtk-search" modal="true" resizable="false" width-request="800" height-request="600">
+<vbox>
+<frame Manage packages by name>
+ <hbox>
+ <text>
+ <label>Enter package(s)</label>
+ </text>
+ <entry>
+ <variable>pkgname</variable>
+ </entry>
+ </hbox>
+ <hbox>
+ <button tooltip-text="Search for package(s)">
+ <label>Search package(s)</label>
+ <action>epkg search $pkgname | $showdialog</action>
+ </button>
+ <button tooltip-text="Install new package(s) (no confirmation)">
+ <label>Install package(s)</label>
+ <action>epkg autoinstall $pkgname | $showdialog</action>
+ </button>
+ <button tooltip-text="Uninstall package(s) safely (no confirmation)">
+ <label>Remove package(s)</label>
+ <action>epkg autoremove $pkgname | $showdialog</action>
+ </button>
+ <button tooltip-text="Upgrade system (no confirmation)">
+ <label>Upgrade System</label>
+ <action>epkg autoupgrade | $showdialog</action>
+ </button>
+ <button tooltip-text="Remove orphan packages(s) aka no longer needed (no confirmation)">
+ <label>Remove orphan package(s)</label>
+ <action>epkg autoclean | $showdialog</action>
+ </button>
+ </hbox>
+</frame>
+<frame Browse packages by category>
+ <hbox>
+ <button tooltip-text="Accesories">
+ <label>Accesories</label>
+ <action signal="button-press-event">gtkdialog --space-expand=true --space-fill=true --program=accesoriesui &</action>
+ <action signal="button-release-event">EXIT:ok</action>
+ </button>
+ <button tooltip-text="Games">
+ <label>Games</label>
+ <action signal="button-press-event">gtkdialog --space-expand=true --space-fill=true --program=gamesui &</action>
+ <action signal="button-release-event">EXIT:ok</action>
+ </button>
+ <button tooltip-text="Graphics">
+ <label>Graphics</label>
+ </button>
+ <button tooltip-text="Internet">
+ <label>Internet</label>
+ </button>
+ </hbox>
+ <hbox>
+ <button tooltip-text="Sound & Video">
+ <label>Sound & Video</label>
+ <action signal="button-press-event">gtkdialog --space-expand=true --space-fill=true --program=multimediaui &</action>
+ <action signal="button-release-event">EXIT:ok</action>
+ </button>
+ <button tooltip-text="Office">
+ <label>Office</label>
+ <action signal="button-press-event">gtkdialog --space-expand=true --space-fill=true --program=officeui &</action>
+ <action signal="button-release-event">EXIT:ok</action>
+ </button>
+ <button tooltip-text="System Tools">
+ <label>System Tools</label>
+ </button>
+ </hbox>
+</frame>
+<frame Terminal Emulator>
+ <hbox>
+ <terminal argv0="/bin/bash">
+ <variable>vte1</variable>
+ <input>echo epkg</input>
+ </terminal>
+ </hbox>
+</frame>
+</vbox>
+</window>
+'