fix neovim LSP issues

This commit is contained in:
Johannes Knopp
2026-03-16 23:44:52 +01:00
parent 545f8ab328
commit 9fbffb7558
7 changed files with 132 additions and 78 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
SOCKET="/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
handle_line() {
local line="$1"
@ -9,6 +9,8 @@ handle_line() {
local event="${line%%>>*}"
local data="${line#*>>}"
echo "$data" > "$HOME/close_popup.tmp.txt"
case "$event" in
openwindow)
# Data format:
@ -16,15 +18,17 @@ handle_line() {
local addr ws class title
IFS=, read -r addr ws class title <<< "$data"
# echo "$data" > $HOME/close_popup.tmp.txt
if [[ "$class" == "jetbrains-webstorm" && "$title" == "Monokai Pro Trial" ]]; then
# closewindow expects address with 0x prefix
hyprctl dispatch closewindow "address:0x$addr"
# echo "$data" > "$HOME/close_popup.tmp.txt"
fi
;;
esac
}
socat -U - "UNIX-CONNECT:$SOCKET" | while read -r line; do
handle_line "$line"
socat -U - UNIX-CONNECT:$SOCKET | while read -r line; do
handle_line "$line";
done