diff --git a/bin/omarchy-theme-next b/bin/omarchy-theme-next index 8899526..eb97d90 100755 --- a/bin/omarchy-theme-next +++ b/bin/omarchy-theme-next @@ -30,22 +30,5 @@ NEXT_INDEX=$(((INDEX + 1) % TOTAL)) NEW_THEME=${THEMES[$NEXT_INDEX]} NEW_THEME_NAME=$(basename "$NEW_THEME") -# Set current theme -ln -nsf "$HOME/.config/omarchy/backgrounds/$NEW_THEME_NAME" "$HOME/.config/omarchy/current/backgrounds" -ln -nsf "$NEW_THEME" "$HOME/.config/omarchy/current/theme" - -# Touch alacritty config to pickup the changed theme -touch "$HOME/.config/alacritty/alacritty.toml" - -# Restart for new theme -pkill -SIGUSR2 waybar -makoctl reload -hyprctl reload - -# Set new background -ln -nsf $(find "$HOME/.config/omarchy/current/backgrounds/" -type f | head -n 1) "$HOME/.config/omarchy/current/background" -pkill -x swaybg -setsid swaybg -i "$HOME/.config/omarchy/current/background" -m fill & - -# Notify of the new theme +omarchy-theme-set $NEW_THEME_NAME notify-send "Theme changed to $NEW_THEME_NAME" -t 2000 diff --git a/bin/omarchy-theme-set b/bin/omarchy-theme-set index e800f5f..4b741a2 100755 --- a/bin/omarchy-theme-set +++ b/bin/omarchy-theme-set @@ -3,14 +3,14 @@ # omarchy-theme-set: Set a theme, specified by its name. # Usage: omarchy-theme-set -THEMES_DIR="$HOME/.config/omarchy/themes/" -CURRENT_THEME_DIR="$HOME/.config/omarchy/current/theme" - if [[ -z "$1" ]]; then echo "Usage: omarchy-theme-set " >&2 exit 1 fi +THEMES_DIR="$HOME/.config/omarchy/themes/" +CURRENT_THEME_DIR="$HOME/.config/omarchy/current/theme" + THEME_NAME="$1" THEME_PATH="$THEMES_DIR/$THEME_NAME" BACKGROUND_PATH="$HOME/.config/omarchy/backgrounds/$THEME_NAME" @@ -39,9 +39,5 @@ if [[ -n "$first_bg" ]]; then ln -nsf "$first_bg" "$HOME/.config/omarchy/current/background" pkill -x swaybg setsid swaybg -i "$HOME/.config/omarchy/current/background" -m fill & -else - # Background does not exist for this theme - fallback to solid black. - rm -f "$HOME/.config/omarchy/current/background" - pkill -x swaybg - setsid swaybg -c '#000000' & -fi \ No newline at end of file +fi +