summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaas Lalani <maas@lalani.dev>2024-04-05 02:32:11 -0400
committerMaas Lalani <maas@lalani.dev>2024-04-05 02:32:16 -0400
commit9ab722ca4fe1e248283091626bd9fe5ecea65e1b (patch)
treeb9dcd4a3b899cfda97a14326168fff5fa2ba6f71
parent42f59ed330459b8f4c0d3a3e97edc837aac2ccb1 (diff)
chore: new gifs (JetBrains Mono)
-rw-r--r--README.md4
-rw-r--r--examples/.gitignore1
-rwxr-xr-xexamples/commit.sh6
-rw-r--r--examples/commit.tape45
-rwxr-xr-xexamples/demo.sh13
-rw-r--r--examples/demo.tape49
6 files changed, 106 insertions, 12 deletions
diff --git a/README.md b/README.md
index f5c271a..9dd6975 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/examples/.gitignore b/examples/.gitignore
new file mode 100644
index 0000000..2d0c929
--- /dev/null
+++ b/examples/.gitignore
@@ -0,0 +1 @@
+*.gif
diff --git a/examples/commit.sh b/examples/commit.sh
index 29ab94c..1252fc9 100755
--- a/examples/commit.sh
+++ b/examples/commit.sh
@@ -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")
diff --git a/examples/commit.tape b/examples/commit.tape
new file mode 100644
index 0000000..b7d7e9c
--- /dev/null
+++ b/examples/commit.tape
@@ -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
diff --git a/examples/demo.sh b/examples/demo.sh
index 9a7c3ca..132dd79 100755
--- a/examples/demo.sh
+++ b/examples/demo.sh
@@ -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"
diff --git a/examples/demo.tape b/examples/demo.tape
new file mode 100644
index 0000000..fe8d27d
--- /dev/null
+++ b/examples/demo.tape
@@ -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