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:
parent
e865a8a1c1
commit
52f1c4a3b1
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue