chore: new gifs (JetBrains Mono)

This commit is contained in:
Maas Lalani 2024-04-05 02:32:11 -04:00
parent 42f59ed330
commit 9ab722ca4f
No known key found for this signature in database
GPG key ID: 5A6ED5CBF1A0A000
6 changed files with 106 additions and 12 deletions

View file

@ -14,7 +14,7 @@ A tool for glamorous shell scripts. Leverage the power of
Gloss](https://github.com/charmbracelet/lipgloss) in your scripts and aliases
without writing any Go code!
<img alt="Shell running the ./demo.sh script" width="600" src="https://stuff.charm.sh/gum/demo.gif">
<img alt="Shell running the ./demo.sh script" width="600" src="https://vhs.charm.sh/vhs-1qY57RrQlXCuydsEgDp68G.gif">
The above example is running from a single shell script ([source](./examples/demo.sh)).
@ -51,7 +51,7 @@ gum confirm "Commit changes?" && git commit -m "$SUMMARY" -m "$DESCRIPTION"
For a working version of the script see how it is all [put together](https://github.com/charmbracelet/gum/blob/main/examples/commit.sh) in a single script.
<img alt="Running the ./examples/commit.sh script to commit to git" width="600" src="https://stuff.charm.sh/gum/commit_2.gif">
<img alt="Running the ./examples/commit.sh script to commit to git" width="600" src="https://vhs.charm.sh/vhs-7rRq3LsEuJVwhwr0xf6Er7.gif">
## Installation

1
examples/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.gif

View file

@ -10,9 +10,9 @@
#
# alias gcm='git commit -m "$(gum input)" -m "$(gum write)"'
if [ -z "$(git status -s -uno | grep -v '^ ' | awk '{print $2}')" ]; then
gum confirm "Stage all?" && git add .
fi
# if [ -z "$(git status -s -uno | grep -v '^ ' | awk '{print $2}')" ]; then
# gum confirm "Stage all?" && git add .
# fi
TYPE=$(gum choose "fix" "feat" "docs" "style" "refactor" "test" "chore" "revert")
SCOPE=$(gum input --placeholder "scope")

45
examples/commit.tape Normal file
View file

@ -0,0 +1,45 @@
Output commit.gif
Set Shell "bash"
Set FontSize 32
Set Width 1200
Set Height 600
Type "./commit.sh" Sleep 500ms Enter
Sleep 1s
Down@250ms 2
Sleep 500ms
Enter
Sleep 500ms
Type "gum"
Sleep 500ms
Enter
Sleep 1s
Type "Gum is sooo tasty"
Sleep 500ms
Enter
Sleep 1s
Type@65ms "I love bubble gum."
Sleep 500ms
Alt+Enter
Sleep 500ms
Alt+Enter
Sleep 500ms
Type "This commit shows how much I love chewing bubble gum!!!"
Sleep 500ms
Enter
Sleep 1s
Left@400ms 3
Sleep 1s

View file

@ -5,7 +5,7 @@ NAME=$(gum input --placeholder "What is your name?")
echo -e "Well, it is nice to meet you, $(gum style --foreground 212 "$NAME")."
sleep 2; clear
sleep 1; clear
echo -e "Can you tell me a $(gum style --italic --foreground 99 'secret')?\n"
@ -14,7 +14,7 @@ gum write --placeholder "I'll keep it to myself, I promise!" > /dev/null # we ke
clear; echo "What should I do with this information?"; sleep 1
READ="Read"; THINK="Think"; DISCARD="Discard"
ACTIONS=$(gum choose --cursor-prefix "[ ] " --selected-prefix "[✓] " --no-limit "$READ" "$THINK" "$DISCARD")
ACTIONS=$(gum choose --no-limit "$READ" "$THINK" "$DISCARD")
clear; echo "One moment, please."
@ -24,8 +24,7 @@ grep -q "$DISCARD" <<< "$ACTIONS" && gum spin -s monkey --title " Discarding you
sleep 1; clear
echo "What's your favorite $(gum style --foreground 212 "Gum") flavor?"
GUM=$(echo -e "Cherry\nGrape\nLime\nOrange" | gum filter)
GUM=$(echo -e "Cherry\nGrape\nLime\nOrange" | gum filter --placeholder "Favorite flavor?")
echo "I'll keep that in mind!"
sleep 1; clear
@ -39,10 +38,10 @@ CHOICE=$(gum choose --item.foreground 250 "Yes" "No" "It's complicated")
sleep 1
gum spin --title "Chewing some $(gum style --foreground "#04B575" "$GUM") bubble gum..." -- sleep 5
gum spin --title "Chewing some $(gum style --foreground "#04B575" "$GUM") bubble gum..." -- sleep 2.5
clear
NICE_MEETING_YOU=$(gum style --height 5 --width 25 --padding '1 3' --border double --border-foreground 57 "Well, it was nice meeting you, $(gum style --foreground 212 "$NAME"). Hope to see you soon!")
CHEW_BUBBLE_GUM=$(gum style --width 25 --padding '1 3' --border double --border-foreground 212 "Don't forget to chew some $(gum style --foreground "#04B575" "$GUM") bubble gum.")
NICE_MEETING_YOU=$(gum style --height 5 --width 20 --padding '1 3' --border double --border-foreground 57 "Nice meeting you, $(gum style --foreground 212 "$NAME"). See you soon!")
CHEW_BUBBLE_GUM=$(gum style --width 17 --padding '1 3' --border double --border-foreground 212 "Go chew some $(gum style --foreground "#04B575" "$GUM") bubble gum.")
gum join --horizontal "$NICE_MEETING_YOU" "$CHEW_BUBBLE_GUM"

49
examples/demo.tape Normal file
View file

@ -0,0 +1,49 @@
Output ./demo.gif
Set Shell bash
Set FontSize 22
Set Width 800
Set Height 450
Type "./demo.sh"
Enter
Sleep 1s
Type "Walter"
Sleep 500ms
Enter
Sleep 2s
Type "Nope, sorry!"
Sleep 500ms
Alt+Enter
Sleep 200ms
Alt+Enter
Sleep 500ms
Type "I don't trust you."
Sleep 1s
Enter
Sleep 2s
Type "x" Sleep 250ms Type "j" Sleep 250ms
Type "x" Sleep 250ms Type "j" Sleep 250ms
Type "x" Sleep 1s
Enter
Sleep 6s
Type "li"
Sleep 1s
Enter
Sleep 3s
Down@500ms 2
Up@500ms 2
Sleep 1s
Enter
Sleep 6s