#!/bin/bash

# omarchy:summary=Open the Omarchy background switcher
# omarchy:group=theme
# omarchy:name=bg-switcher
# omarchy:aliases=omarchy background

OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
theme_name=$(cat "$HOME/.config/omarchy/current/theme.name" 2>/dev/null)
current_background=$(readlink -f "$HOME/.config/omarchy/current/background" 2>/dev/null)

omarchy-menu-images \
  --selected "$current_background" \
  "$HOME/.config/omarchy/current/theme/backgrounds" \
  "$HOME/.config/omarchy/backgrounds/$theme_name"
