mirror of
1
0
Fork 0

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
1 changed files with 3 additions and 3 deletions

View File

@ -415,8 +415,8 @@ tmux_conf_uninstall_plugins_on_reload=true
#
# # /!\ do not "uncomment" the functions: the leading "# " characters are needed
#
# weather() {
# curl -m 1 wttr.in?format=3 2>/dev/null
# weather() { # see https://github.com/chubin/wttr.in#one-line-output
# 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
# }
#