nixos/home-manager/modules/eww/config/scripts/get-window-title

4 lines
257 B
Text
Raw Normal View History

2024-08-28 16:08:36 +00:00
#!/bin/sh
hyprctl activewindow -j | jq --raw-output .title | sed 's/\(.\{120\}\).*/\1.../'
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' '/^activewindow>>/{print $3}' | sed 's/\(.\{120\}\).*/\1.../'