Separate menu for reuse, add explicit quit

This commit is contained in:
David Heinemeier Hansson
2024-06-13 12:00:48 +02:00
parent 5d49d30ae6
commit 38760ca4bd
2 changed files with 8 additions and 8 deletions

View File

@@ -1,11 +1,4 @@
#!/bin/bash
source $OMAKUB_PATH/ascii.sh
if [ $# -eq 0 ]; then
SUB=$(gum choose "Help" "Theme" "Font" "Install" "Uninstall" "Update" --height 9 --header "" | tr '[:upper:]' '[:lower:]')
else
SUB=$1
fi
[ -n "$SUB" ] && source $OMAKUB_PATH/bin/omakub-$SUB
source $OMAKUB_PATH/bin/omakub-menu

7
bin/omakub-menu Normal file
View File

@@ -0,0 +1,7 @@
if [ $# -eq 0 ]; then
SUB=$(gum choose "Help" "Theme" "Font" "Install" "Uninstall" "Update" "Quit" --height 10 --header "" | tr '[:upper:]' '[:lower:]')
else
SUB=$1
fi
[ -n "$SUB" ] && [ "$SUB" != "quit" ] && source $OMAKUB_PATH/bin/omakub-$SUB