- New default/themed/ templates (alacritty, btop, foot, ghostty, helix, hyprland, hyprlock, kitty, mako, obsidian, rofi, swayosd, tmux, walker, waybar, keyboard.rgb, gum.env, etc.) - Add omarchy-* theme management scripts (install, refresh, set, remove, update, bg-set, colors-from-alacritty, current, etc.) - Add omarchy restart/hook scripts (btop, hyprctl, hypridle, mako, tmux) - Add installer/environment.sh for shared env vars - Add 19 theme directories with colors.toml, vscode.json, backgrounds, and app-specific configs (catppuccin, everforest, gruvbox, nord, tokyo-night, rose-pine, etc.) - Update bing-wallpaper script to use new .config/omarchy path
37 lines
920 B
Bash
Executable File
37 lines
920 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Remove a user-installed theme
|
|
# omarchy:args=[theme-name]
|
|
# omarchy:examples=omarchy theme remove "Tokyo Night"
|
|
|
|
if [[ -z $1 ]]; then
|
|
mapfile -t extra_themes < <(find ~/.config/omarchy/themes -mindepth 1 -maxdepth 1 -type d ! -xtype l -printf '%f\n')
|
|
|
|
if (( ${#extra_themes[@]} > 0 )); then
|
|
THEME_NAME=$(printf '%s\n' "${extra_themes[@]}" | sort | gum choose --header="Remove extra theme")
|
|
else
|
|
echo "No extra themes installed."
|
|
exit 1
|
|
fi
|
|
else
|
|
THEME_NAME="$1"
|
|
fi
|
|
|
|
THEMES_DIR="$HOME/.config/omarchy/themes"
|
|
CURRENT_DIR="$HOME/.config/omarchy/current"
|
|
THEME_PATH="$THEMES_DIR/$THEME_NAME"
|
|
|
|
# Ensure a theme was set
|
|
if [[ -z $THEME_NAME ]]; then
|
|
exit 1
|
|
fi
|
|
|
|
# Check if theme exists before attempting removal
|
|
if [[ ! -d $THEME_PATH ]]; then
|
|
echo "Error: Theme '$THEME_NAME' not found."
|
|
exit 1
|
|
fi
|
|
|
|
# Now remove the theme directory for THEME_NAME
|
|
rm -rf "$THEME_PATH"
|