fix nvim config

This commit is contained in:
Johannes Knopp
2026-02-22 17:06:22 +01:00
parent 4093701fca
commit 545f8ab328
10 changed files with 95 additions and 120 deletions

View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
SOCKET="/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
handle_line() {
local line="$1"
# Split into EVENT and DATA (EVENT>>DATA)
local event="${line%%>>*}"
local data="${line#*>>}"
case "$event" in
openwindow)
# Data format:
# WINDOWADDRESS,WORKSPACENAME,WINDOWCLASS,WINDOWTITLE
local addr ws class title
IFS=, read -r addr ws class title <<< "$data"
if [[ "$class" == "jetbrains-webstorm" && "$title" == "Monokai Pro Trial" ]]; then
# closewindow expects address with 0x prefix
hyprctl dispatch closewindow "address:0x$addr"
fi
;;
esac
}
socat -U - "UNIX-CONNECT:$SOCKET" | while read -r line; do
handle_line "$line"
done