Avoid file conflict with walker package for config.toml

walker owns /etc/xdg/walker/config.toml and overwrites it on every
update. Instead of fighting for that path, deploy our config override
to user homes (~/.config/walker/) via the .install hook where XDG
lookup finds it first. Also fix stale rofi dependency → walker + elephant.
This commit is contained in:
2026-03-30 19:39:50 +02:00
parent 939de4472f
commit d827c689b0
2 changed files with 23 additions and 1 deletions
+13
View File
@@ -19,6 +19,19 @@ post_install() {
cp /usr/share/moonarch/moongreet/moongreet.toml /etc/moongreet/moongreet.toml
fi
# Deploy Walker config override to skel and existing user homes.
# Only copies if user has no config yet — never overwrites manual edits.
install -Dm644 /usr/share/moonarch/walker-config.toml \
/etc/skel/.config/walker/config.toml
while IFS=: read -r _ _ uid gid _ home _; do
if [ "$uid" -ge 1000 ] && [ "$uid" -lt 60000 ] && [ -d "$home" ]; then
if [ ! -f "$home/.config/walker/config.toml" ]; then
install -Dm644 -o "$uid" -g "$gid" /usr/share/moonarch/walker-config.toml \
"$home/.config/walker/config.toml"
fi
fi
done < /etc/passwd
# Cleanup legacy /usr/local/bin/ scripts from pre-package installs
rm -f /usr/local/bin/moonarch-* 2>/dev/null || true
rm -f /usr/local/bin/swww /usr/local/bin/swww-daemon 2>/dev/null || true