Switch to using tips
This commit is contained in:
1 parent
ca79d0f4dc
commit
4e8ee7da9b
1 file changed
+24
-18
@@ -47,20 +47,24 @@ export GUM_CONFIRM_UNSELECTED_BACKGROUND="${GUM_CONFIRM_UNSELECTED_BACKGROUND:-0
|
|||||||
child_pid=""
|
child_pid=""
|
||||||
child_pgid=""
|
child_pgid=""
|
||||||
|
|
||||||
whimsy=(
|
tips=(
|
||||||
"delivering delightful defaults"
|
"Super + Space opens the Omarchy menu for apps, settings, and more"
|
||||||
"saving setup struggles"
|
"Super + K shows all the key bindings"
|
||||||
"picking polished packages"
|
"Use Xournal++ to sign PDFs"
|
||||||
"curating cohesive colors"
|
"Share files with phones and laptops using LocalSend"
|
||||||
"preparing pleasant pixels"
|
"Turn any website into an app with Install > Web App in the menu"
|
||||||
"hyping happy hyprland"
|
"Super + Return opens a terminal, Super + Shift + Return the browser"
|
||||||
"integrating intuitive interfaces"
|
"Edit images with Pinta, videos with Kdenlive, docs with LibreOffice"
|
||||||
"bootstrapping beautiful boxes"
|
"Super + Ctrl + Print grabs text off the screen with OCR"
|
||||||
"crafting cozy commands"
|
"Print takes a screenshot, Alt + Print records the screen"
|
||||||
"making machines marvelous"
|
"Set a reminder with Super + Ctrl + R"
|
||||||
"polishing pretty pixels"
|
"Switch themes from Style > Theme in the Omarchy menu"
|
||||||
"tuning tasteful terminals"
|
"Double-click the menu bar to make it transparent"
|
||||||
"weaving wonderful workflows"
|
"Run a full Windows VM via Install > Windows in the menu"
|
||||||
|
"Super + Ctrl + V opens the clipboard manager"
|
||||||
|
"Super + 1 through 0 switches workspaces, add Shift to bring the window"
|
||||||
|
"Super + Print picks a color from anywhere on screen"
|
||||||
|
"Keep the system fresh with Update in the Omarchy menu"
|
||||||
)
|
)
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
@@ -239,9 +243,11 @@ install_progress() {
|
|||||||
printf '%s' "$pct"
|
printf '%s' "$pct"
|
||||||
}
|
}
|
||||||
|
|
||||||
current_whimsy() {
|
# One tip per ~8 seconds (frames tick every 0.5s), in order, so each stays
|
||||||
local frame="$1" pct="$2"
|
# readable and none are skipped when progress jumps.
|
||||||
printf '%s' "${whimsy[$(( (pct / 8 + frame / 8) % ${#whimsy[@]} ))]}"
|
current_tip() {
|
||||||
|
local frame="$1"
|
||||||
|
printf '%s' "${tips[$(( frame / 16 % ${#tips[@]} ))]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
render_static() {
|
render_static() {
|
||||||
@@ -266,7 +272,7 @@ render_dynamic() {
|
|||||||
progress_bar "$pct" 34
|
progress_bar "$pct" 34
|
||||||
printf '\n'
|
printf '\n'
|
||||||
blank_line
|
blank_line
|
||||||
center "${GREEN}$(current_whimsy "$frame" "$pct")${RESET}" "$CONTENT_WIDTH"
|
center "${DIM}Tip:${RESET} ${GREEN}$(current_tip "$frame")${RESET}" "$CONTENT_WIDTH"
|
||||||
printf '%s' "$CLEAR_TO_END"
|
printf '%s' "$CLEAR_TO_END"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user