diff --git a/.test/choose/LibreWolf.sh b/.test/choose/LibreWolf.sh new file mode 100644 index 0000000..9401259 --- /dev/null +++ b/.test/choose/LibreWolf.sh @@ -0,0 +1,20 @@ +#!/bin/sh +( +echo "10" +echo "20" +echo "50" +echo "75" +echo "100" +) | +zenity --progress \ + --title="Installing Web Browser" \ + --text="Beginning installation..." \ + --percentage=0 + +if [ "$?" = -1 ] ; then + zenity --error \ + --text="Installation was canceled." +else + zenity --info \ + --text="To apply custom configuration, open LibreWolf and then close it. Doing so will generate the folder for LibreWolf. Once you've done that, click OK." +fi \ No newline at end of file diff --git a/.test/choose/Zen.sh b/.test/choose/Zen.sh new file mode 100644 index 0000000..6933c5c --- /dev/null +++ b/.test/choose/Zen.sh @@ -0,0 +1,17 @@ +#!/bin/sh +( +echo "10" +echo "20" +echo "50" +echo "75" +echo "100" +) | +zenity --progress \ + --title="Installing Web Browser" \ + --text="Beginning installation..." \ + --percentage=0 + +if [ "$?" = -1 ] ; then + zenity --error \ + --text="Installation was canceled." +fi \ No newline at end of file diff --git a/.test/choose/zenity-choose.sh b/.test/choose/zenity-choose.sh new file mode 100644 index 0000000..8c5e783 --- /dev/null +++ b/.test/choose/zenity-choose.sh @@ -0,0 +1,5 @@ +opt1="LibreWolf" +opt2="Zen" +int=`zenity --height=360 --list --radiolist --title "Linux Setup" --text 'Select a web browser:' --column '' --column 'Browser' FALSE "$opt1" FALSE "$opt2"` + +sh .test/choose/$int.sh \ No newline at end of file diff --git a/.test/dual-select/yes-no.sh b/.test/dual-select/yes-no.sh new file mode 100644 index 0000000..086d0ae --- /dev/null +++ b/.test/dual-select/yes-no.sh @@ -0,0 +1,5 @@ +if zenity --title="Linux Setup" --ok-label="Yes" --cancel-label="No" --question --text="Choose"; then + echo "Yes" +else + echo "No" +fi \ No newline at end of file diff --git a/.test/list.sh b/.test/list.sh new file mode 100644 index 0000000..803099f --- /dev/null +++ b/.test/list.sh @@ -0,0 +1,28 @@ +if zenity --width=400 --height=600 --list --title "Linux Setup" --ok-label="Uninstall Now" --cancel-label="Abort Setup" --text 'The following will be uninstalled' --column 'Apps' \ +"Camera" \ +"Characters" \ +"Clocks" \ +"Connections" \ +"Contacts" \ +"Disk" \ +"Document Scanner" \ +"Disk Usage Analyzer" \ +"Document Viewer" \ +"Fedora Media Writer" \ +"Fonts" \ +"Help" \ +"Libre Office" \ +"Logs" \ +"Maps" \ +"Mozilla Firefox" \ +"Problem Reporting" \ +"Rhythmbox" \ +"System Monitor" \ +"Terminal" \ +"Tour" \ +"Videos" \ +"Weather"; then + echo "Uninstalling apps now..." +else + echo "Setup was aborted" +fi \ No newline at end of file