2022-07-06 19:16:01 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-07-07 19:26:35 +02:00
|
|
|
go install github.com/charmbracelet/gum
|
2022-07-06 19:16:01 +02:00
|
|
|
|
2022-07-07 19:26:35 +02:00
|
|
|
echo "Hello, there! Welcome to $(gum style --foreground 212 'Gum')."
|
2022-07-06 19:16:01 +02:00
|
|
|
|
2022-07-07 19:26:35 +02:00
|
|
|
NAME=$(gum input --placeholder "What is your name?")
|
2022-07-06 19:16:01 +02:00
|
|
|
|
2022-07-07 19:26:35 +02:00
|
|
|
echo "Well, it is nice to meet you, $(gum style --foreground 212 "$NAME")."
|
2022-07-06 19:16:01 +02:00
|
|
|
|
2022-07-07 19:26:35 +02:00
|
|
|
COLOR=$(gum input --placeholder "What is your favorite color? (#HEX)")
|
2022-07-06 19:16:01 +02:00
|
|
|
|
|
|
|
echo "Wait a moment, while I think of my favorite color..."
|
|
|
|
|
2022-07-16 06:23:05 +02:00
|
|
|
gum spin --title "Thinking..." -- sleep 3
|
2022-07-06 19:16:01 +02:00
|
|
|
|
2022-07-07 23:46:22 +02:00
|
|
|
echo "I like $(gum style --padding "0 1" --background $COLOR $COLOR), too. In fact, it's my $(gum style --padding "0 1" --background $COLOR 'favorite color!')"
|
2022-07-06 19:16:01 +02:00
|
|
|
|
|
|
|
sleep 1
|
|
|
|
|
2022-07-07 19:26:35 +02:00
|
|
|
echo "Seems like we have a lot in common, $(gum style --foreground 212 "$NAME")."
|
2022-07-06 19:16:01 +02:00
|
|
|
|
|
|
|
sleep 1
|
|
|
|
|
2022-07-07 19:26:35 +02:00
|
|
|
echo "What's your favorite Gum flavor?"
|
2022-07-06 19:16:01 +02:00
|
|
|
|
2022-07-08 19:38:42 +02:00
|
|
|
GUM=$(echo "Cherry
|
2022-07-06 19:16:01 +02:00
|
|
|
Grape
|
|
|
|
Lime
|
2022-07-08 19:58:14 +02:00
|
|
|
Orange" | gum filter)
|
2022-07-06 19:16:01 +02:00
|
|
|
|
|
|
|
echo "One sec, while I finish my drink."
|
|
|
|
|
2022-07-16 06:23:05 +02:00
|
|
|
gum spin --title "Chewing some $GUM bubble gum..." -- sleep 5
|
2022-07-06 19:16:01 +02:00
|
|
|
|
2022-07-07 19:26:35 +02:00
|
|
|
gum style --width 50 --padding "1 5" --margin "1 2" --border double --border-foreground 212 \
|
|
|
|
"Well, it was nice meeting you, $(gum style --foreground 212 "$NAME"). Hope to see you soon!"\
|
|
|
|
"Don't forget to chew some $(gum style --foreground 212 $GUM) bubble gum."
|