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

Invoke startup hook just once #39

Closed
ghost opened this issue Jul 25, 2023 · 3 comments
Closed

Invoke startup hook just once #39

ghost opened this issue Jul 25, 2023 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 25, 2023

I use the dwl:hook-startup in my configuration to manually start the Shepherd daemon so that home services like kanshi are initialized after the compositor. However, doing this causes the dwl-guile daemon to break upon reconfiguration. My first thought was to get the PID, persist it in a variable and check if this exists in further reconfigurations, but I'm not sure how to go about this via dwl:spawn. AFAICT, you work around this in your config by using custom Shepherd services that have a requirement of dwl-guile, but tackling this would be useful for people that don't use RDE/don't want to override features.

@Frewacom
Copy link
Member

Hi,

The startup hook is only called once during startup, and will not be called again, even if you reload the config (from what I can see).

Are you sure that your startup hook callbacks are called again on reconfigure?

@ghost
Copy link
Author

ghost commented Aug 6, 2023

Yes, my bad, apologies. It seems that using a program-file inside the callback caused some weird quirks. I've now reworked it to use dwl:spawn and it works as expected.

@ghost ghost closed this as completed Aug 6, 2023
@Frewacom
Copy link
Member

Frewacom commented Aug 7, 2023

No worries!

This issue was closed.
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

1 participant