fix(desktop): apply wallpaper on version changes before legacy guards

Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/3c085026-21a9-4afb-b39f-1d04f1ddd49f

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-15 18:02:30 +00:00
committed by GitHub
parent d458d8c07a
commit 6f63e0f4d0

View File

@@ -22,6 +22,24 @@ let
STAMP="$HOME/.config/sovran-theme-applied" STAMP="$HOME/.config/sovran-theme-applied"
USER_DB="$HOME/.config/dconf/user" USER_DB="$HOME/.config/dconf/user"
# Always apply wallpaper on version change
WALLPAPER_VERSION="${customWallpaper.version}"
WALLPAPER_STAMP="$HOME/.config/sovran-wallpaper-version"
BG_DIR="/run/current-system/sw/share/backgrounds/sovran"
ULTRAWIDE="$BG_DIR/sovran-ultrawide.png"
CHOSEN="$ULTRAWIDE"
if [ ! -f "$WALLPAPER_STAMP" ] || [ "$(cat "$WALLPAPER_STAMP")" != "$WALLPAPER_VERSION" ]; then
if [ -f "$CHOSEN" ]; then
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/background/picture-uri "'file://$CHOSEN'"
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/background/picture-uri-dark "'file://$CHOSEN'"
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/background/picture-options "'zoom'"
mkdir -p "$(dirname "$WALLPAPER_STAMP")"
echo "$WALLPAPER_VERSION" > "$WALLPAPER_STAMP"
fi
fi
# Already applied skip # Already applied skip
if [ -f "$STAMP" ]; then if [ -f "$STAMP" ]; then
exit 0 exit 0
@@ -36,19 +54,7 @@ let
# Fresh install no user-db exists yet, apply full Sovran theme below # Fresh install no user-db exists yet, apply full Sovran theme below
BG_DIR="/run/current-system/sw/share/backgrounds/sovran"
ULTRAWIDE="$BG_DIR/sovran-ultrawide.png"
CHOSEN="$ULTRAWIDE"
${pkgs.dconf}/bin/dconf load / << EOF ${pkgs.dconf}/bin/dconf load / << EOF
[org/gnome/desktop/background]
picture-uri='file://$CHOSEN'
picture-uri-dark='file://$CHOSEN'
picture-options='zoom'
primary-color='#000000'
secondary-color='#000000'
[org/gnome/desktop/interface] [org/gnome/desktop/interface]
color-scheme='prefer-dark' color-scheme='prefer-dark'
enable-animations=true enable-animations=true
@@ -412,4 +418,4 @@ in
} }
]; ];
} }