ZSHFiles/p10k-segments/prompt_c_weather

5 lines
284 B
Plaintext
Raw Normal View History

local tmpfile=$CACHEPATH/weather
[ -r "$tmpfile" ] || return
typeset -g _cprompts_weather=($(< $tmpfile))
[ -v _cprompts_weather ] && p10k segment -b ${_cprompts_weather[2]:-white} -i ${_cprompts_weather[3]:-\?} -t "${_cprompts_weather[1]:-unknown}°C ${_cprompts_weather[4]:-unk}%%"