Simplify wallpaper function to use fixed background path

No longer accepts an argument — always regenerates colors from
the wallpaper managed by git at ~/.local/share/backgrounds/wallpaper.png.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ediblerope 2026-04-14 10:33:52 +01:00
parent 79460a955e
commit a706438b08

View file

@ -128,21 +128,10 @@
function fish_right_prompt; end function fish_right_prompt; end
# Set wallpaper and regenerate color theme # Regenerate wallpaper color theme
function wallpaper function wallpaper
if test (count $argv) -ne 1 matugen image ~/.local/share/backgrounds/wallpaper.png --source-color-index 0 -m dark
echo "Usage: wallpaper <path-to-image>" echo "Wallpaper colors updated! Shell theme reloaded."
return 1
end
set -l img (realpath "$argv[1]")
if not test -f "$img"
echo "File not found: $img"
return 1
end
gsettings set org.gnome.desktop.background picture-uri "file://$img"
gsettings set org.gnome.desktop.background picture-uri-dark "file://$img"
matugen image "$img" --source-color-index 0 -m dark
echo "Wallpaper and colors updated! Shell theme reloaded."
end end
''; '';
} }