moonarch-git: skip wlsunset in global enable loop
Build and publish packages / build-and-publish (push) Successful in 18s
Build and publish packages / build-and-publish (push) Successful in 18s
The blanket WantedBy-symlink loop installed a global-scope link for wlsunset, which meant `systemctl --user disable` (the waybar nightlight toggle's mechanism) could never persist — systemd warned about exactly this scope mismatch on every disable. Filter survived reboots even when the user turned it off. PKGBUILD now skips wlsunset; moonarch.install drops the legacy symlink on upgrade. pkgrel bumped so installed systems pick up the fix.
This commit is contained in:
+12
-4
@@ -5,7 +5,7 @@
|
||||
|
||||
pkgname=moonarch-git
|
||||
pkgver=r123.952776c
|
||||
pkgrel=11
|
||||
pkgrel=12
|
||||
pkgdesc="Moonarch desktop environment defaults — Niri, Waybar, Catppuccin Mocha"
|
||||
arch=('any')
|
||||
url="https://gitea.moonarch.de/nevaforget/moonarch"
|
||||
@@ -209,11 +209,19 @@ package() {
|
||||
# --- Systemd user services -> /etc/systemd/user/ ---
|
||||
install -Dm644 defaults/etc/systemd/user/*.service -t "$pkgdir/etc/systemd/user/"
|
||||
|
||||
# Enable services by creating the WantedBy symlinks directly
|
||||
# Enable services by creating the WantedBy symlinks directly.
|
||||
# Toggle-able services (user-controlled via UI) are skipped here so
|
||||
# `systemctl --user disable` can actually take effect — a global-scope
|
||||
# symlink in /etc/ would override any user-scope disable.
|
||||
install -dm755 "$pkgdir/etc/systemd/user/graphical-session.target.wants"
|
||||
skip_enable=("wlsunset.service")
|
||||
for svc in defaults/etc/systemd/user/*.service; do
|
||||
ln -sf "../$(basename "$svc")" \
|
||||
"$pkgdir/etc/systemd/user/graphical-session.target.wants/$(basename "$svc")"
|
||||
name="$(basename "$svc")"
|
||||
for s in "${skip_enable[@]}"; do
|
||||
[[ "$name" == "$s" ]] && continue 2
|
||||
done
|
||||
ln -sf "../$name" \
|
||||
"$pkgdir/etc/systemd/user/graphical-session.target.wants/$name"
|
||||
done
|
||||
|
||||
# --- Systemd system service (battery conservation restore) -> /usr/lib/systemd/system/ ---
|
||||
|
||||
@@ -95,6 +95,11 @@ pre_upgrade() {
|
||||
done < /etc/passwd
|
||||
rm -f /etc/systemd/user/graphical-session.target.wants/cliphist.service 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Drop legacy global-scope wlsunset enablement. Nightlight is a toggle —
|
||||
# the global symlink overrode user-scope disable, so the filter survived
|
||||
# reboots even after the user turned it off.
|
||||
rm -f /etc/systemd/user/graphical-session.target.wants/wlsunset.service 2>/dev/null || true
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
|
||||
Reference in New Issue
Block a user