Add onMonitorChange hyprland hook script

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-02-14 19:29:42 +00:00
parent 3e67e2a299
commit b6635d01c2
4 changed files with 48 additions and 12 deletions

View File

@@ -0,0 +1,8 @@
handle() {
# shellcheck disable=SC2086
case $1 in
monitoradded*|monitorremoved*) systemctl --user restart $SERVICES ;;
esac
}
socat -U - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do handle "$line"; done