Unload the config-installed plugin copy in buildAndLoad.sh

The session loads its own copy of the plugin from the Hyprland config, a
separate dlopen with its own decorations - so iterating with a dev build on
top of it drew two frames on every window.

Grep the path back out of $XDG_CONFIG_HOME/hypr rather than hardcoding it:
a home-manager-installed copy lives at a /nix/store path that changes on
every rebuild. -R, since those config files are symlinks into the store.
hyprctl plugin list reports no path, so the config is the only place to
read it from.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-29 20:36:41 +02:00
co-authored by Claude Opus 5
parent b9dafe2ce1
commit 375cfe1f00
3 changed files with 22 additions and 2 deletions
+5 -2
View File
@@ -87,5 +87,8 @@ hyprctl plugin unload "$(pwd)/hypr-chrome.so"
loader never fully unmaps a `.so` once `dlopen`'d, so reloading the same path
just re-serves the old (possibly stale) mapping — the script works around
this by copying each build to a uniquely-suffixed filename before loading it
and cleaning up prior copies. It hardcodes an absolute checkout path at the
top; check it matches your checkout before running it.
and cleaning up prior copies. It also unloads any copy your own Hyprland
config loads (found by grepping `$XDG_CONFIG_HOME/hypr` for a `hypr-chrome`
`.so` path), since that one is a separate `dlopen` that would draw a second
frame on every window. It hardcodes an absolute checkout path at the top;
check it matches your checkout before running it.