diff --git a/deckshift.sh b/deckshift.sh index 02b54a9..6d2fe6f 100755 --- a/deckshift.sh +++ b/deckshift.sh @@ -34,7 +34,7 @@ set -Euo pipefail # -u: Treat unset variables as errors (catches typos in variable names) # -o pipefail: A pipeline fails if ANY command in it fails, not just the last one -DECKSHIFT_VERSION="0.1.4" +DECKSHIFT_VERSION="0.1.5" # Resolve the directory this script lives in so we can find sibling files like # bin/deckshift-settings and applications/deckshift-settings.desktop when @@ -2431,7 +2431,8 @@ KEYBIND_MONITOR # screencast portal would bind to nothing. We now (a) push live session # env into D-Bus + systemd --user so portals activate against the new # Wayland socket, (b) stop portals first, (c) restart pipewire and wait - # for the graph, (d) start portals last. + # for the graph, (d) start portals last, (e) restart Walker/elephant so + # the clipboard listener reattaches to the live Wayland socket too. info "Creating portal recovery helper..." local portal_recovery="/usr/local/bin/deckshift-portal-recovery" @@ -2466,6 +2467,16 @@ sleep 2 # Now bring portals up cleanly. systemctl --user start xdg-desktop-portal-hyprland.service xdg-desktop-portal.service 2>/dev/null || true + +# Walker (elephant) holds the clipboard listener, which is also bound to the +# dead Hyprland's Wayland socket and stays broken until restarted. Prefer the +# omarchy helper if present; fall back to direct systemctl --user. +if command -v omarchy-restart-walker >/dev/null 2>&1; then + omarchy-restart-walker >/dev/null 2>&1 || true +else + systemctl --user restart elephant.service 2>/dev/null || true + systemctl --user restart app-walker@autostart.service 2>/dev/null || true +fi PORTAL_RECOVERY sudo chmod +x "$portal_recovery"