fix(desktop): harden wallpaper version stamp read

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:04:02 +00:00
committed by GitHub
parent 8cf43fd3d1
commit a0e110b376

View File

@@ -29,7 +29,12 @@ let
BG_DIR="/run/current-system/sw/share/backgrounds/sovran"
ULTRAWIDE="$BG_DIR/sovran-ultrawide.png"
if [ ! -f "$WALLPAPER_STAMP" ] || [ "$(cat "$WALLPAPER_STAMP")" != "$WALLPAPER_VERSION" ]; then
CURRENT_WALLPAPER_VERSION=""
if [ -r "$WALLPAPER_STAMP" ]; then
read -r CURRENT_WALLPAPER_VERSION < "$WALLPAPER_STAMP"
fi
if [ "$CURRENT_WALLPAPER_VERSION" != "$WALLPAPER_VERSION" ]; then
if [ -f "$ULTRAWIDE" ]; then
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/background/picture-uri "'file://$ULTRAWIDE'"
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/background/picture-uri-dark "'file://$ULTRAWIDE'"