-
Notifications
You must be signed in to change notification settings - Fork 40
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
Auto start #38
Comments
any progress on that? so currently after each emacs restart i need to issue M-x prodigy, and go to the process and issue M-x prodigy-start? |
i would be great if you could merge #106. i moving my systemd/launchd stuff over to prodigy and auto start would be really helpful. thanks |
I wrote the following snippet for adding a primitive auto-start feature that fits my needs, if anyone is interested: (defun isamert/prodigy-autostart ()
"Start all services with the `:auto-start' set to non-nil if they
are not already started."
(interactive)
(prodigy-with-refresh
(--each
prodigy-services
(when (and (plist-get it :auto-start)
(not (prodigy-service-started-p it)))
(prodigy-start-service it)))))
(add-hook
'after-init-hook
#'isamert/prodigy-autostart) You need to add |
Now that I think of this, I can prepare a PR with the following function (and with some documentation regarding to it) (defun prodigy-autostart ()
"Start all services with the `:auto-start' set to non-nil if they
are not already started."
(interactive)
(prodigy-with-refresh
(--each
prodigy-services
(when (and (plist-get it :auto-start)
(not (prodigy-service-started-p it)))
(prodigy-start-service it))))) and we can advise users to add this function to a some hook they see fit to get a basic auto-start feature going (and maybe we can advertise the |
The PR #106 did a lot of work on this including tests and documentation. The basic logic is similar to yours but there's some additional settings etc. I say we should finish that one. Would you like to pick it up and test if it covers your use-case? |
I saw that PR and I even tried to patch my local prodigy copy with it but it failed as some file names are changed etc. Then I saw that it's from 4 years ago and thought it's probably easier to define a function like the one above and call it a day instead of trying to rebase it with the current master. I may look into cleaning that PR but I don't know when I would pick this task up. |
This is an idea about adding a new property called
:auto-start
. If that is set to true, the service will automatically start when it's defined.For example:
The text was updated successfully, but these errors were encountered: