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

Start automatically on traffic #92

Open
WhyNotHugo opened this issue Jul 22, 2022 · 2 comments
Open

Start automatically on traffic #92

WhyNotHugo opened this issue Jul 22, 2022 · 2 comments

Comments

@WhyNotHugo
Copy link

launchd has a functionality where it can bind to a socket, and when there's incoming traffic, it starts a service and passes that on. It should be usable by Anybar.

I'm not sure on the details. On Linux, systemd allows this, and I know they copied this design feature from macOS, and that's the extent of my familiarity on it. This link seems very useful. plist is a keyword here.

With such a setup, AnyBar could be set up to start automatically when an application attempts to connect to it, without requiring any change on client's side.

@tonsky
Copy link
Owner

tonsky commented Jul 22, 2022

Sounds cool, would be great if you could provide a PR to README

@onderweg
Copy link

launchd has a functionality where it can bind to a socket, and when there's incoming traffic, it starts a service and passes that on. It should be usable by Anybar.

I'm not sure on the details. On Linux, systemd allows this, and I know they copied this design feature from macOS, and that's the extent of my familiarity on it. This link seems very useful. plist is a keyword here.

With such a setup, AnyBar could be set up to start automatically when an application attempts to connect to it, without requiring any change on client's side.

I don't think this would be really applicable to AnyBar. What launchd (and systemd) can do is: listen to a network port, spawn a new instance of a process when a connection is made and send the incoming data to the standard input of the spawned process (AnyBar in this case)

But that would mean that for every incoming UDP connection (every status change), a new AnyBar instance will start. Also AnyBar would nee to be able to accept input from stdin.

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

3 participants