Skip to content

Instantly share code, notes, and snippets.

@jessefarinacci
Created July 25, 2025 15:17
Show Gist options
  • Select an option

  • Save jessefarinacci/7f8782b3e44972a06f54c7cccfe1aadf to your computer and use it in GitHub Desktop.

Select an option

Save jessefarinacci/7f8782b3e44972a06f54c7cccfe1aadf to your computer and use it in GitHub Desktop.
retro-fortune
if (( $+commands[fortune] && $+commands[gum] && $+commands[pastel])) ; then
local c1=$(pastel random --number=1 | pastel format hex)
local t1=$(pastel textcolor "${c1}" | pastel format hex)
local c2=$(pastel lighten "0.2" "${c1}" | pastel format hex)
local t2=$(pastel textcolor "${c2}" | pastel format hex)
local c3=$(pastel darken "0.1" "${c2}" | pastel format hex)
fortune | \
gum style \
--background="${c1}" \
--border="rounded" \
--border-background="${c2}" \
--border-foreground="${t2}" \
--foreground="${t1}" \
--padding="3" | \
gum style \
--background="${c3}" \
--border="double" \
--padding="2 5 2 5" \
--no-strip-ansi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment