hypr-chrome v0.1

This commit is contained in:
2026-07-28 21:22:13 +02:00
commit a28a899874
18 changed files with 1227 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -e
DIR="/mnt/hdd_01/data/Dev/repos/hypr-chrome"
cd "$DIR"
cmake -B build -S .
cmake --build build
# Hyprland's plugin loader never fully unmaps a .so once dlopen'd - reloading
# the same path just serves the old (possibly deleted/stale) mapping instead
# of the freshly built one. Loading a uniquely-named copy each time forces a
# real reload.
UID_SUFFIX=$(od -An -N4 -tx4 /dev/urandom | tr -d ' \n')
NEW_SO="hypr-chrome-${UID_SUFFIX}.so"
cp hypr-chrome.so "$NEW_SO"
for old in hypr-chrome.so hypr-chrome-*.so; do
[ "$old" = "$NEW_SO" ] && continue
hyprctl plugin unload "$DIR/$old" >/dev/null 2>&1 || true
[ "$old" = "hypr-chrome.so" ] || rm -f "$old"
done
hyprctl plugin load "$DIR/$NEW_SO"