Extract generic switcher
This commit is contained in:
@@ -6,15 +6,11 @@
|
||||
# omarchy:aliases=omarchy wallpaper
|
||||
|
||||
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
||||
selection_file=$(mktemp)
|
||||
trap 'rm -f "$selection_file"' EXIT
|
||||
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_WALLPAPER_SELECTION_FILE=$selection_file \
|
||||
OMARCHY_STOCK_BACKGROUNDS_DIR="$HOME/.config/omarchy/current/theme/backgrounds" \
|
||||
OMARCHY_USER_BACKGROUNDS_DIR="$HOME/.config/omarchy/backgrounds/$theme_name" \
|
||||
quickshell -p "$OMARCHY_PATH/default/quickshell/wallpaper-switcher.qml" >/dev/null
|
||||
|
||||
if [[ -s $selection_file ]]; then
|
||||
cat "$selection_file"
|
||||
fi
|
||||
omarchy-menu-images \
|
||||
--selected "$current_background" \
|
||||
--namespace "omarchy-wallpaper-switcher" \
|
||||
"$HOME/.config/omarchy/current/theme/backgrounds" \
|
||||
"$HOME/.config/omarchy/backgrounds/$theme_name"
|
||||
|
||||
Reference in New Issue
Block a user