socat doesn't work inside deflisten variable #492
-
I am trying to update my workspaces module in eww to listen to a socket in Hyprland for workspace updates, but for some reason socat refuses to run inside a script launched from a deflisten variable, and I can't figure out why.
The above script has two alternative lines at the bottom for tracking workspace events, one by using I'm sure I'm somehow being dense, which is why I didn't just open an issue, but any thoughts are welcome. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
for reference, I've also experimented with calling socat directly inside of deflisten, and I get the same results. No socat process:
Note, I replaced $HYPRLAND_INSTANCE_SIGNATURE with the actual value as a sanity check. |
Beta Was this translation helpful? Give feedback.
-
Socat is definitely executing, and doesn't seem to report any errors. Running it with the -lf flag successfully generates an empty log file. socat just seems to exit immediately. |
Beta Was this translation helpful? Give feedback.
-
Alright, I figured it out. Turns out in this case socat needs to be called with the -u (unidirectional) flag because stdout doesn't generate any traffic back to the hyprland socket and socat times out waiting. I'm not sure why this only occurs when running the script inside eww, but here we are. |
Beta Was this translation helpful? Give feedback.
Alright, I figured it out. Turns out in this case socat needs to be called with the -u (unidirectional) flag because stdout doesn't generate any traffic back to the hyprland socket and socat times out waiting. I'm not sure why this only occurs when running the script inside eww, but here we are.