From 0abdf156243b40aa68de2a5877b04570ef9a266e Mon Sep 17 00:00:00 2001 From: nevaforget Date: Wed, 8 Apr 2026 11:46:29 +0200 Subject: [PATCH] fix(moonarch-git): migrate cliphist.service to split text/image services pre_upgrade hook removes old cliphist.service symlinks before the package replaces it with cliphist-text and cliphist-image services. --- moonarch-git/moonarch.install | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/moonarch-git/moonarch.install b/moonarch-git/moonarch.install index 52675e5..0c3f1f3 100644 --- a/moonarch-git/moonarch.install +++ b/moonarch-git/moonarch.install @@ -88,6 +88,16 @@ pre_upgrade() { if [ -d /etc/xdg/walker/themes/moonarch ] && ! pacman -Qo /etc/xdg/walker/themes/moonarch/style.css &>/dev/null; then rm -rf /etc/xdg/walker/themes/moonarch fi + + # Migrate cliphist.service → cliphist-text + cliphist-image + if [ -f /etc/systemd/user/cliphist.service ]; then + while IFS=: read -r _ _ uid _ _ home _; do + if [ "$uid" -ge 1000 ] && [ "$uid" -lt 60000 ] && [ -d "$home" ]; then + rm -f "$home/.config/systemd/user/graphical-session.target.wants/cliphist.service" 2>/dev/null || true + fi + done < /etc/passwd + rm -f /etc/systemd/user/graphical-session.target.wants/cliphist.service 2>/dev/null || true + fi } post_upgrade() {