config/neofetch: update weather and add pinfo
This commit is contained in:
parent
8abac2299c
commit
4d5b5893da
|
@ -8,7 +8,7 @@ print_info() {
|
|||
info "OS" distro
|
||||
info "Host" model
|
||||
info "Memory" memory
|
||||
prin "Weather" "$(timeout .4s curl --max-time 0.3 'wttr.in/?0?q?T' | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}' || echo Timeout)"
|
||||
prin "Weather" "$(timeout .4s curl --max-time 1 'wttr.in/?0?q?T' | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}' || echo Timeout)"
|
||||
prin "IP" "$(timeout .4s ( curl --max-time 0.3 ifconfig.me && printf " / " && curl icanhazip.com ) )"
|
||||
}
|
||||
|
||||
|
|
|
@ -3,24 +3,23 @@
|
|||
|
||||
# See this wiki page for more info:
|
||||
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
|
||||
pinfo() {
|
||||
info "$@" | sed -e 's/\x1b\[[0-9;]*[mC]//g' | xargs
|
||||
}
|
||||
|
||||
print_info() {
|
||||
info title
|
||||
info underline
|
||||
|
||||
info "OS" distro
|
||||
info "Host" model
|
||||
info "Kernel" kernel
|
||||
prin "OS" "$(pinfo distro) $(pinfo kernel)"
|
||||
info "Uptime" uptime
|
||||
info "Packages" packages
|
||||
info "Shell" shell
|
||||
info "Resolution" resolution
|
||||
info "Packages" packages
|
||||
prin "Terminal" "$(pinfo term) $(pinfo "with font" term_font) running $(pinfo shell)"
|
||||
info "DE" de
|
||||
info "WM" wm
|
||||
info "WM Theme" wm_theme
|
||||
info "Theme" theme
|
||||
info "Icons" icons
|
||||
info "Terminal" term
|
||||
info "Terminal Font" term_font
|
||||
prin "WM" "$(pinfo wm) $(pinfo wm_theme)"
|
||||
prin "Theme" "$(pinfo theme) $(pinfo "with icons" icons)"
|
||||
info "CPU" cpu
|
||||
info "GPU" gpu
|
||||
info "Memory" memory
|
||||
|
@ -28,22 +27,21 @@ print_info() {
|
|||
# info "GPU Driver" gpu_driver # Linux/macOS only
|
||||
# info "CPU Usage" cpu_usage
|
||||
# info "Disk" disk
|
||||
# info "Battery" battery
|
||||
info "Battery" battery
|
||||
# info "Font" font
|
||||
# info "Song" song
|
||||
# info "Local IP" local_ip
|
||||
# info "Public IP" public_ip
|
||||
# info "Users" users
|
||||
# info "Install Date" install_date
|
||||
# info "Locale" locale # This only works on glibc systems.
|
||||
|
||||
prin "Weather" "$(curl wttr.in/?0?q?T -m 0.3 | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}' || echo Timeout)"
|
||||
prin "IP" "$(curl ifconfig.me)"
|
||||
#prin "IP" "$(curl ifconfig.me)"
|
||||
info "Public IP" public_ip
|
||||
prin "IPv6" "$(curl icanhazip.com)"
|
||||
|
||||
info line_break
|
||||
prin "Weather" "$(timeout .6s curl --max-time 1 'wttr.in/?0?q?T' | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}' || echo Timeout)"
|
||||
|
||||
info cols
|
||||
info line_break
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,7 +98,7 @@ os_arch="on"
|
|||
# on: '2 days, 10 hours, 3 mins'
|
||||
# off: '2 days, 10 hours, 3 minutes'
|
||||
# tiny: '2d 10h 3m'
|
||||
uptime_shorthand="on"
|
||||
uptime_shorthand="off"
|
||||
|
||||
|
||||
# Shell
|
||||
|
@ -115,7 +113,7 @@ uptime_shorthand="on"
|
|||
# Example:
|
||||
# on: '/bin/bash'
|
||||
# off: 'bash'
|
||||
shell_path="off"
|
||||
shell_path="on"
|
||||
|
||||
# Show $SHELL version
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue