mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Look for backgrounds matching the new theme.name
We no longer have symlinks
This commit is contained in:
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
# Cycles through the background images available
|
# Cycles through the background images available
|
||||||
|
|
||||||
THEME_NAME=$(basename "$(readlink "$HOME/.config/omarchy/current/theme")")
|
THEME_NAME=$(cat "$HOME/.config/omarchy/current/theme.name" 2>/dev/null)
|
||||||
THEME_BACKGROUNDS_PATH="$HOME/.config/omarchy/current/theme/backgrounds/"
|
THEME_BACKGROUNDS_PATH="$HOME/.config/omarchy/current/theme/backgrounds/"
|
||||||
USER_BACKGROUNDS_PATH="$HOME/.config/omarchy/backgrounds/$THEME_NAME/"
|
USER_BACKGROUNDS_PATH="$HOME/.config/omarchy/backgrounds/$THEME_NAME/"
|
||||||
CURRENT_BACKGROUND_LINK="$HOME/.config/omarchy/current/background"
|
CURRENT_BACKGROUND_LINK="$HOME/.config/omarchy/current/background"
|
||||||
|
|
||||||
mapfile -d '' -t BACKGROUNDS < <(find -L "$USER_BACKGROUNDS_PATH" "$THEME_BACKGROUNDS_PATH" -type f -print0 2>/dev/null | sort -z)
|
mapfile -d '' -t BACKGROUNDS < <(find -L "$USER_BACKGROUNDS_PATH" "$THEME_BACKGROUNDS_PATH" -maxdepth 1 -type f -print0 2>/dev/null | sort -z)
|
||||||
TOTAL=${#BACKGROUNDS[@]}
|
TOTAL=${#BACKGROUNDS[@]}
|
||||||
|
|
||||||
if [[ $TOTAL -eq 0 ]]; then
|
if [[ $TOTAL -eq 0 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user