Closed navneetankur closed 2 years ago
Could you please explain your use case?
I don't always have my window manager running. If I close my window manager, clipmenud fills the terminal with error lines. Making the terminal unusable. Also, it uses high amount of CPU due to the loop continuously running.
This adds a dependency on xset, which isn't acceptable just for this.
Okay, that makes sense.
Though I will add two things.
if type xset
If xset is not available, this feature(code path) can be completely ignored.At worst I think all we'd need is exponential backoff.
I guess that would help my use case too. Maybe it will allow enough time to use the tty to kill the clipmenud.
I don't always have my window manager running. If I close my window manager, clipmenud fills the terminal with error lines. Making the terminal unusable.
clipmenud is dependent on X, but shouldn't be dependent on having any window manager running. Can you please show an example?
Maybe it will allow enough time to use the tty to kill the clipmenud.
Thanks. So, in general it's the user's responsibility to make sure clipmenud is launched and shut down at the appropriate time (or configure their user manager as such).
I'm ok with adding a backoff. Exponential backoff seems excessive, but adding sleep 10
with a comment is fine.
clipmenud is dependent on X, but shouldn't be dependent on having any window manager running.
Well, I close X too. Sorry for the confusion.
I'm ok with adding a backoff. Exponential backoff seems excessive, but adding sleep 10 with a comment is fine.
Thanks.
Oh sorry, I realise I made an error in my last round of review. What we probably actually want is:
if ! wait "$_CM_CLIPNOTIFY_PID"; then
# X server dead?
sleep 10
continue
fi
Sorry to ask for another change, that's my bad. The continue
is needed to stop spam from other places.
Thank you! Looks great.
Thanks
Hi! This adds a dependency on xset, which isn't acceptable just for this.
Could you please explain your use case? At worst I think all we'd need is exponential backoff.