Make commands more resilient
This commit is contained in:
parent
07894acedd
commit
87dc5549dc
11
bin/omakub
11
bin/omakub
@ -1,5 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source $OMAKUB_PATH/ascii.sh
|
source $OMAKUB_PATH/ascii.sh
|
||||||
SUB=$(gum choose "Help" "Theme" "Font" "Install" | tr '[:upper:]' '[:lower:]')
|
|
||||||
source $OMAKUB_PATH/bin/omakub-$SUB
|
if [ $# -eq 0 ]; then
|
||||||
|
SUB=$(gum choose "Help" "Theme" "Font" "Install" --height 7 --header "" | tr '[:upper:]' '[:lower:]')
|
||||||
|
else
|
||||||
|
SUB=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
[ -n "$SUB" ] && source $OMAKUB_PATH/bin/omakub-$SUB
|
||||||
|
@ -4,6 +4,8 @@ set -e
|
|||||||
# Pick a preconfigured theme
|
# Pick a preconfigured theme
|
||||||
FONT=$(gum choose "Cascadia Mono" "Fira Mono" "JetBrains Mono" "Meslo" | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
|
FONT=$(gum choose "Cascadia Mono" "Fira Mono" "JetBrains Mono" "Meslo" | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
|
||||||
|
|
||||||
|
[ ! -n "$FONT" ] && exit 0
|
||||||
|
|
||||||
if [ "$FONT" == "cascadia-mono" ]; then
|
if [ "$FONT" == "cascadia-mono" ]; then
|
||||||
NERD_FONT="CaskaydiaMono Nerd Font"
|
NERD_FONT="CaskaydiaMono Nerd Font"
|
||||||
elif [ "$FONT" == "fira-mono" ]; then
|
elif [ "$FONT" == "fira-mono" ]; then
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
HELP=$(gum choose "Hotkeys" "Commands" "Tactile" | tr '[:upper:]' '[:lower:]')
|
HELP=$(gum choose "Hotkeys" "Commands" "Tactile" --height 5 | tr '[:upper:]' '[:lower:]')
|
||||||
gum pager <$OMAKUB_PATH/help/$HELP.md
|
[ -n "$HELP" ] && gum pager <$OMAKUB_PATH/help/$HELP.md
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
INSTALLER=$(gum file $OMAKUB_PATH/install)
|
INSTALLER=$(gum file $OMAKUB_PATH/install)
|
||||||
gum confirm "Run installer?" && source $INSTALLER
|
[ -n "$INSTALLER" ] && gum confirm "Run installer?" && source $INSTALLER
|
||||||
|
Loading…
Reference in New Issue
Block a user