* Update location of sourced install script * Add OMARCHY_PATH for easy access * Formatting * Enable using finder in walker (#396) * Enable using finder in walker * capitalize name property * Hot reload theme for quick switching * Use fonts from AUR instead of downloading them directly like an animal * Include the common JetBrains substitution * Add a very basic font selector for terminal * Give the new font selector a bit of room to breathe * Swap Spotify GUI to TUI * Correct package name * Add theme update script (#391) * Move updating themes from Updates to theme menu Yeah, it could go in either spot, but since we have one entire category dedicated to themes, lets keep it there. * Revert "Correct package name" This reverts commit4c46c2208a. * Revert "Swap Spotify GUI to TUI" This reverts commitb09d2d68cd. * Added backup timestamps to various omarchy-refresh-* files to prevent clobbering (#402) * Added backup timestamps to omarchy-refresh-[hyprlock|swayosd|walker|waybar] scripts to prevent data loss if ran multiple times * Added new script (omarchy-refresh-config) for refreshing various config files with automated backup creation * update plymouth logo (#406) * Track migrations via state files to avoid running migrations that have already been performed. (#411) * Just use set -e instead of manually checking for return values * Fix migration * Unused * Migrate fonts to packages * No longer needed * Use fd for better performance on walker finder * Add walker config refresh to enable the finder * Dropbox is now an optional setup --------- Co-authored-by: Shigeto Kumagai <shk@all.daynight.jp> Co-authored-by: Mohamedsayhii <63726183+Mohamedsayhii@users.noreply.github.com> Co-authored-by: Ryan Hughes <ryan@heyoodle.com> Co-authored-by: Andy Davis <developer.andy@gmail.com> Co-authored-by: Taha <paprikataha@gmail.com>
158 lines
4.1 KiB
Bash
Executable File
158 lines
4.1 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
|
|
tte -i ~/.local/share/omarchy/logo.txt --frame-rate 640 --no-color expand
|
|
echo " $OMARCHY_VERSION"
|
|
}
|
|
|
|
main_menu() {
|
|
show_ascii_art
|
|
|
|
local options=("Theme" "Font" "Setup" "Update" "Manual" "Exit")
|
|
choice=$(printf "%s\n" "${options[@]}" | gum choose --header "") || exit 0
|
|
case "$choice" in
|
|
Theme) theme_menu ;;
|
|
Font)
|
|
omarchy-font-menu
|
|
ack_command
|
|
main_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" "SwayOSD" "Desktop apps" "Back")
|
|
local commands=(
|
|
"omarchy-update"
|
|
"omarchy-refresh-waybar"
|
|
"omarchy-refresh-walker"
|
|
"omarchy-refresh-plymouth"
|
|
"omarchy-refresh-swayosd"
|
|
"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" "Update" "Remove" "Back")
|
|
local commands=(
|
|
"omarchy-theme-menu"
|
|
"install_theme_prompt"
|
|
"omarchy-theme-update"
|
|
"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=("Dropbox" "Steam" "Docker DBs" "Fingerprint sensor" "Fido2 device" "Back")
|
|
local commands=(
|
|
"omarchy-setup-dropbox"
|
|
"omarchy-setup-steam"
|
|
"setup_docker_dbs"
|
|
"omarchy-setup-fingerprint"
|
|
"omarchy-setup-fido2"
|
|
"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
|
|
}
|
|
|
|
setup_docker_dbs() {
|
|
options=("MariaDB" "MySQL" "Redis" "PostgreSQL")
|
|
choices=$(printf "%s\n" "${options[@]}" | gum choose --no-limit --header "Select databases (space to select, return to install, esc to cancel)") || main_menu
|
|
|
|
if [[ -n "$choices" ]]; then
|
|
for db in $choices; do
|
|
case $db in
|
|
MySQL) sudo docker run -d --restart unless-stopped -p "127.0.0.1:3306:3306" --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8.4 ;;
|
|
PostgreSQL) sudo docker run -d --restart unless-stopped -p "127.0.0.1:5432:5432" --name=postgres16 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:16 ;;
|
|
MariaDB) sudo docker run -d --restart unless-stopped -p "127.0.0.1:3306:3306" --name=mariadb11 -e MARIADB_ROOT_PASSWORD= -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=true mariadb:11.8 ;;
|
|
Redis) sudo docker run -d --restart unless-stopped -p "127.0.0.1:6379:6379" --name=redis redis:7 ;;
|
|
esac
|
|
done
|
|
fi
|
|
|
|
main_menu
|
|
}
|
|
|
|
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
|