From 7df555a756bd2f8306a1c5ee4e43344acb771ee7 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 22 Jan 2025 09:25:09 -0600 Subject: [PATCH] Use nc instead of socat because socat is dying inexplicably --- .../eww/scripts/hypr-workspaces.bash | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/home-manager/eww/scripts/hypr-workspaces.bash b/modules/home-manager/eww/scripts/hypr-workspaces.bash index 8f869f5..66523dc 100755 --- a/modules/home-manager/eww/scripts/hypr-workspaces.bash +++ b/modules/home-manager/eww/scripts/hypr-workspaces.bash @@ -57,14 +57,16 @@ workspaces() { )" } +workspace_reader() { + while read -r l; do + workspaces "$l" + done +} + # initial render workspaces # listen to events and re-render -while true; do - # TODO: not sure why this socat | read invocation seems to stop? - socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do - workspaces "$line" - done -done -echo '(box "DONE")' +nc -U "$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | workspace_reader + +echo '(box "EXITING")'