Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-c does not run command when background process? #5

Open
mizlan opened this issue Feb 22, 2022 · 3 comments
Open

-c does not run command when background process? #5

mizlan opened this issue Feb 22, 2022 · 3 comments

Comments

@mizlan
Copy link

mizlan commented Feb 22, 2022

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.

@cormacrelf
Copy link
Owner

cormacrelf commented Feb 22, 2022

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.

@mizlan
Copy link
Author

mizlan commented Aug 15, 2022

Hello, do you plan on adding the flag?

@mizlan
Copy link
Author

mizlan commented Aug 15, 2022

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

tommyip added a commit to tommyip/dark-notify that referenced this issue Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants