user/eww-wayland: fix title script to truncate properly

This commit is contained in:
LavaDesu 2025-03-15 22:36:14 +11:00
parent 88196824f6
commit 91a993a8f7
Signed by: cilly
GPG key ID: 6500251E087653C9

View file

@ -9,9 +9,10 @@ out () {
}
init=$(hyprctl activewindow -j | jq --raw-output .title)
out "$init"
trunc=$(echo $init | cut -c-60)
out "$trunc"
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' '/^activewindow>>/{print $3}' | while read -r line ; do
trunc=$(echo $line | cut -c-85)
trunc=$(echo $line | cut -c-60)
out "$trunc"
done