dark-notify icon indicating copy to clipboard operation
dark-notify copied to clipboard

-c does not run command when background process?

Open mizlan opened this issue 3 years ago • 3 comments

Simple test, something like

dark-notify -c 'touch' &

Change system theme while this is running, file is not created. But when back into fg, then you see the file dark or light appear. I would like this to work even in background process to change my kitty theme.

mizlan avatar Feb 22 '22 05:02 mizlan

bash-5.1$ target/debug/dark-notify -c echo &
[1] 10369
bash-5.1$ jobs -l
[1]+ 10369 Stopped (tty input): 21 target/debug/dark-notify -c echo

It is waiting for tty input, specifically for the word 'quit' to be sent to stdin, and when a backgrounded process attempts to read STDIN it is sent a SIGSTOP. So it needs a flag to disable this, I think. Would have been nice if I thought of this before and the flag was to enable monitoring stdin for quit, it was put in there specifically for the nvim plugin.

cormacrelf avatar Feb 22 '22 07:02 cormacrelf

Hello, do you plan on adding the flag?

mizlan avatar Aug 15 '22 18:08 mizlan

I can try making a PR although i've never written a line of rust in my life

mizlan avatar Aug 15 '22 19:08 mizlan