Replies: 2 comments 2 replies
-
Can you post the output log of the crash? I'm interested to see if this point is fixable |
Beta Was this translation helpful? Give feedback.
1 reply
-
Instead of read msg </dev/tcp/localhost/$PORT
echo $msg |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I'm having some trouble with this script I hacked together for dwmblocks, basically the script does 2 things:
both of these use a loop to swap the layer and to read the layer with
timeout --s QUIT 0.1 nc 127.0.0.1 10000
However kanata tends to crash with this, while
nc -w1 127.0.0.1 10000
does not cause kanata to crash (not that I have noticed), so I'm assuming I can't poll in such sort intervals.Does anybody know of a better way to poll kanata so that the current layer information gets updated instantly (or nearly instantly) or maybe if kanata has a built-in way to run a command on every layer change so I don't have to use a loop to constantly read the tcp output (xdotool would still need a loop I imagine but I can live with that, idk if dwm can run an a command on window change).
Also is there a way I can just make the tcp connection once and still have the script be able to do other things, I know
nc 127.0.0.1 10000
basically does that, but I can't use the info, it basically connects and "pauses" the rest of the script untill the netcat command is killed.Here's the script for reference:
Some video references
with timeout 0.1 (module gets updated almost instantly on layer swap):
timeout.mp4
with nc -w1 (module lags behind, does not get updated as fast):
w1.mp4
Beta Was this translation helpful? Give feedback.
All reactions