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

[Feature Request] Not start volctl if instance is already running #57

Closed
paulhersch opened this issue Aug 21, 2021 · 5 comments
Closed

Comments

@paulhersch
Copy link

As the title says
If i have an instance of volctl running i would like to have volctl not run a second time. I have volctl in the startup script of my WM and reloading the config usually starts volctl a second time.

@raven2cz
Copy link
Contributor

raven2cz commented Aug 22, 2021

I don't know if buzz will implement this feature. But you can write your bash script which ensures correct launch of volctl.

This trick can find the volctl instance and wait for killing it.

# Terminate already running bar instances
killall -q volctl
# Wait until the processes have been shut down
while pgrep -u $UID -x volctl >/dev/null; do sleep 1; done

If you need whole script, I can try to write it. Or is it enough for you?

@paulhersch
Copy link
Author

Thank You! This is enough for me
It is a workaround for now then i guess (until the feature gets implemented (hopefully))

@pijulius
Copy link

If I may vote contra this, what if I want to start two separate instances, one on display 0 and one on display 1. I think being able to run as many instances as I want is better as you can always kill the old instance if you don't want this to happen.

@raven2cz
Copy link
Contributor

Yes, and it is a reason why it is implemented by this way. Several *nix services are provided by this way. If someone need to lead just one instance, the easy script handles this, like my simple example, or create appropriate systemd service to control singleton initalization only.

@paulhersch
Copy link
Author

Script method works, no need for ony having one instance running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants