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:
parent
939de4472f
commit
d827c689b0
@ -22,7 +22,8 @@ depends=(
|
|||||||
|
|
||||||
# Bar, launcher, notifications
|
# Bar, launcher, notifications
|
||||||
'waybar'
|
'waybar'
|
||||||
'rofi-lbonn-wayland-git'
|
'walker'
|
||||||
|
'elephant'
|
||||||
'dunst'
|
'dunst'
|
||||||
|
|
||||||
# Terminal
|
# Terminal
|
||||||
@ -107,9 +108,13 @@ package() {
|
|||||||
cd "$srcdir/moonarch"
|
cd "$srcdir/moonarch"
|
||||||
|
|
||||||
# --- XDG configs -> /etc/xdg/ ---
|
# --- XDG configs -> /etc/xdg/ ---
|
||||||
|
# walker/config.toml is excluded (owned by walker package).
|
||||||
|
# Our override is installed to /usr/share/moonarch/ and deployed
|
||||||
|
# to /etc/skel/ + existing user homes via the .install hook.
|
||||||
local _xdg_src="defaults/xdg"
|
local _xdg_src="defaults/xdg"
|
||||||
while IFS= read -r -d '' file; do
|
while IFS= read -r -d '' file; do
|
||||||
local _rel="${file#"$_xdg_src/"}"
|
local _rel="${file#"$_xdg_src/"}"
|
||||||
|
[[ "$_rel" == "walker/config.toml" ]] && continue
|
||||||
if [[ "$file" == *.sh ]]; then
|
if [[ "$file" == *.sh ]]; then
|
||||||
install -Dm755 "$file" "$pkgdir/etc/xdg/$_rel"
|
install -Dm755 "$file" "$pkgdir/etc/xdg/$_rel"
|
||||||
else
|
else
|
||||||
@ -146,6 +151,10 @@ package() {
|
|||||||
install -Dm644 packages/official.txt "$pkgdir/usr/share/moonarch/official.txt"
|
install -Dm644 packages/official.txt "$pkgdir/usr/share/moonarch/official.txt"
|
||||||
install -Dm644 packages/aur.txt "$pkgdir/usr/share/moonarch/aur.txt"
|
install -Dm644 packages/aur.txt "$pkgdir/usr/share/moonarch/aur.txt"
|
||||||
|
|
||||||
|
# --- Walker config override (deployed to user homes by .install) ---
|
||||||
|
install -Dm644 defaults/xdg/walker/config.toml \
|
||||||
|
"$pkgdir/usr/share/moonarch/walker-config.toml"
|
||||||
|
|
||||||
# --- Reference configs for greetd/moongreet (deployed by .install, not owned) ---
|
# --- Reference configs for greetd/moongreet (deployed by .install, not owned) ---
|
||||||
install -Dm644 defaults/etc/greetd/config.toml \
|
install -Dm644 defaults/etc/greetd/config.toml \
|
||||||
"$pkgdir/usr/share/moonarch/greetd/config.toml"
|
"$pkgdir/usr/share/moonarch/greetd/config.toml"
|
||||||
|
|||||||
@ -19,6 +19,19 @@ post_install() {
|
|||||||
cp /usr/share/moonarch/moongreet/moongreet.toml /etc/moongreet/moongreet.toml
|
cp /usr/share/moonarch/moongreet/moongreet.toml /etc/moongreet/moongreet.toml
|
||||||
fi
|
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
|
# 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/moonarch-* 2>/dev/null || true
|
||||||
rm -f /usr/local/bin/swww /usr/local/bin/swww-daemon 2>/dev/null || true
|
rm -f /usr/local/bin/swww /usr/local/bin/swww-daemon 2>/dev/null || true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user