-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make dwmblocks modules async #1296
base: master
Are you sure you want to change the base?
Conversation
I think it'd be much better for the signal code be passed as the fourth argument to the |
Does anything else need to be changed? |
Updated to latest commits, also added an exponential backoff retry which tries five times to connect but doubles the amount of seconds between each try starting from 1 second. This is because sometimes |
I made some changes. For the backgrounding, first it's checked whether there is even internet at all, and if there is, curl is tried. If either of them fail both of these checks are retried after 60 seconds. Because of this change, it's now possible to start your computer up without internet, and if at some point you get internet access, the curl downloads will automatically be completed after a little while, after which the status bar is updated and the backgrounding stops. The same happens if the services are initially down and later come up again. You don't need to refresh dwm for the downloads to be retried. I've also made sure that no new backgrounding processes are started whenever dwm is refreshed and the backgrounding is still active. |
@LukeSmithxyz bump |
@appeasementPolitik I am trying to get these new statusbar scripts working on my machine, but can't seem to get any output in the status bar. I cannot get any output from calling the scripts from the terminal either. Do I need to do anything else to get them to work? I have added the following to my dwmblocks
|
Strange, you shouldn't have to do anything extra as far as I'm aware. These are the relevant dwmblocks config entries for me:
I personally have It's normal that most scripts don't give an output and immediately return whenever the download is not completed yet. It starts a service in the background that tries the download. One thing you could check is to run the scripts and open |
Off-topic: @josephkerkhof I installed fresh Artix+LARBS last week, dwmblocks functioned perfectly from the get-go. This issue is unrelated to any problem you have (open an issue and I will try to help if not others) On-topic: This is a great addition, what holds it from merge? |
@thetubster99 I implemented the changes on your branch for fast retry, works very nicely. It now very quickly tries 100 times first when the network is still going up before switching to a cooldown of 60 seconds. For the case where the network adapter takes a while to go up, to avoid unnecessarily sleeping for 60 seconds. |
I'm not sure what's holding it from merge. I've been using this PR for a year now without problems. |
fixes #1295
Makes the dwmblocks modules that make a request to the internet asynchronous so they don't block the entire status bar from showing on slow or no connection. The bar is actually quicker even when the internet is pretty fast which is nice.
For
sb-iplocate
, add/* {"", "sb-iplocate", 0, 27}, */
to the
config.h
of dwmblocks.