1
0
Fork 0
mirror of synced 2024-12-22 06:41:07 -05:00

updated the weather() sample function, closes #580

- increase the curl timeout to 2 seconds
- use curl -f -s instead of redirecting stderr to /dev/null
- print an empty line in case curl is not available or exists in error,
  which should prevent tmux from displaying <... not ready>
This commit is contained in:
Gregory Pakosz 2022-07-16 20:33:13 +02:00
parent e865a8a1c1
commit 52f1c4a3b1

View file

@ -415,8 +415,8 @@ tmux_conf_uninstall_plugins_on_reload=true
# #
# # /!\ do not "uncomment" the functions: the leading "# " characters are needed # # /!\ do not "uncomment" the functions: the leading "# " characters are needed
# #
# weather() { # weather() { # see https://github.com/chubin/wttr.in#one-line-output
# curl -m 1 wttr.in?format=3 2>/dev/null # curl -f -s -m 2 'wttr.in?format=3' || printf '\n' # /!\ make sure curl is installed
# sleep 900 # sleep for 15 minutes, throttle network requests whatever the value of status-interval # sleep 900 # sleep for 15 minutes, throttle network requests whatever the value of status-interval
# } # }
# #