Files
omarchy/bin/omarchy
Ryan Hughes 5b3c324350 Change default launcher from Wofi to Walker (#218)
* Change launcher from wofi -> walker

* Add migration

* More wofi -> walker locations

* Add rose pine theme

* Rename refresh script

* Minor improvements to walker + add uwsm

* Back out running as service

* Make these executable

* Add plugins dir for now to resolve open issue 355 from v0.13.0 release

* Replace pavucontrol with wiremix (#225)

Add to install

* Revert "Replace pavucontrol with wiremix (#225)"

This reverts commit 620b397859.

* Fix reference

* Add libqalculate so calc works out of the box

* Actually add libqalculate

* Re-add media

* Add catppuccin-latte

* Final cleanup

* Remove partially baked theme

* Remove failing migration

* Remove failing migration

* Fix refresh script

* Simplify css setup

* Rearrange walker theme files

* Change theme name

* Remove unnecessary file

* Clear everything

* Only worry about the config file now

* Disable load in animation for walker

* Run walker as service

* Make sure we have fresh package db

* Add keybindings theme

* Remove history

* Explain section

* Assume wofi is gone, only run if walker isn't there

* Move as the latest

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
Co-authored-by: Roeland <roel4d@webding.org>
2025-07-20 16:17:42 -05:00

142 lines
4.6 KiB
Bash
Executable File

#!/bin/bash
OMARCHY_VERSION=$(git -C ~/.local/share/omarchy describe --tags --abbrev=0 2>/dev/null)
PATH="$PATH:$HOME/.local/share/omarchy/bin"
show_ascii_art() {
clear
cat <<'EOF'
▄██████▄ ▄▄▄▄███▄▄▄▄ ▄████████ ▄████████ ▄████████ ▄█ █▄ ▄██ ▄
███ ███ ▄██▀▀▀███▀▀▀██▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ██▄
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ █▀ ███ ███ ███▄▄▄███
███ ███ ███ ███ ███ ███ ███ ▄███▄▄▄▄██▀ ███ ▄███▄▄▄▄███▄▄ ▀▀▀▀▀▀███
███ ███ ███ ███ ███ ▀███████████ ▀▀███▀▀▀▀▀ ███ ▀▀███▀▀▀▀███▀ ▄██ ███
███ ███ ███ ███ ███ ███ ███ ▀███████████ ███ █▄ ███ ███ ███ ███
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
▀██████▀ ▀█ ███ █▀ ███ █▀ ███ ███ ████████▀ ███ █▀ ▀█████▀
███ ███
EOF
echo " $OMARCHY_VERSION"
}
main_menu() {
show_ascii_art
local options=("Theme" "Setup" "Update" "Manual" "Exit")
choice=$(printf "%s\n" "${options[@]}" | gum choose --header "") || exit 0
case "$choice" in
Theme) theme_menu ;;
Update) update_menu ;;
Setup) setup_menu ;;
Manual) open_manual ;;
Exit) clear && exit 0 ;;
esac
}
update_menu() {
show_ascii_art
local menu=("Omarchy" "Waybar" "Walker" "Plymouth" "Desktop apps" "Back")
local commands=(
"omarchy-update"
"omarchy-refresh-waybar"
"omarchy-refresh-walker"
"omarchy-refresh-plymouth"
"omarchy-refresh-applications"
"main_menu"
)
local choice
choice=$(printf "%s\n" "${menu[@]}" | gum choose --header="Update") || main_menu
for i in "${!menu[@]}"; do
if [[ "${menu[$i]}" == "$choice" ]]; then
if [[ "$choice" == "Back" ]]; then
main_menu
else
eval "${commands[$i]}"
ack_command
main_menu
fi
break
fi
done
}
theme_menu() {
show_ascii_art
local menu=("Pick" "Install" "Remove" "Back")
local commands=(
"omarchy-theme-menu"
"install_theme_prompt"
"remove_theme_prompt"
"main_menu"
)
local choice
choice=$(printf "%s\n" "${menu[@]}" | gum choose --header="Theme") || main_menu
for i in "${!menu[@]}"; do
if [[ "${menu[$i]}" == "$choice" ]]; then
if [[ "$choice" == "Back" ]]; then
main_menu
else
eval "${commands[$i]}"
ack_command
main_menu
fi
break
fi
done
}
install_theme_prompt() {
local url
url=$(gum input --placeholder="Git repo URL for theme" --header="")
if [[ -n "$url" ]]; then
omarchy-theme-install "$url"
fi
theme_menu
}
remove_theme_prompt() {
local theme
theme=$(gum input --placeholder="Theme name" --header="")
if [[ -n "$theme" ]]; then
omarchy-theme-remove "$theme"
fi
theme_menu
}
setup_menu() {
show_ascii_art
local menu=("Add fingerprint sensor" "Remove fingerprint sensor" "Add Fido2 device" "Remove Fido2 device" "Back")
local commands=(
"omarchy-setup-fingerprint"
"omarchy-setup-fingerprint --remove"
"omarchy-setup-fido2"
"omarchy-setup-fido2 --remove"
"main_menu"
)
local choice
choice=$(printf "%s\n" "${menu[@]}" | gum choose --header="Setup") || main_menu
for i in "${!menu[@]}"; do
if [[ "${menu[$i]}" == "$choice" ]]; then
if [[ "$choice" == "Back" ]]; then
main_menu
else
eval "${commands[$i]}"
ack_command
main_menu
fi
break
fi
done
}
open_manual() {
setsid chromium --new-window --ozone-platform=wayland --app="https://manuals.omamix.org/2/the-omarchy-manual" >/dev/null 2>&1 &
clear
}
ack_command() {
gum spin --spinner "globe" --title "Done!" -- sleep 1
}
main_menu