Open ssnailed opened 1 year ago
If you can implement the backgrounding elegantly, I think that would be a good idea. I've started to add -m
to a lot of these curl
-based modules for that reason, but yes, that would be a more principled solution.
Hey, I'm currently working on adding this as this is also a feature I would like to see. So far I'm having good results so I'll make a pull request in a little while
Perfect, I haven't had any time to work on it yet
Currently when dwmblocks starts, it will hang on sb-forecast/sb-moonphase if wttr.in is slow to respond. The easy solution to this is to just introduce a timeout by using the -m or --connect-timeout flags for curl. Alternatively, you could have sb-forecast immediately return but have it start a background process to fetch the weather. This sub-process would then have to send a signal to dwmblocks once the weather is fetched. This would considerably improve the start time of dwmblocks for people with chronically slow internet connections and would prevent dwmblocks from hanging on startup.
Is this a change that would make sense? I would be happy to contribute this if this is something you are interested in.