.config
.emacs.d
.gkrellm2
.local
bin
Chatty
Checking-repo
Logc
Logs
Update
Update-kernel
Update-pkg
WinBox
backupSynology
backupSynologyMac
bgp-check
bin-cp
browser-x
chardetect
chatty-run
cidr2mask
cleaner
cleanertmp
cmus-control
cmus-shell
cpumhz
debugger
dmenumount
dmenuumount
dmenuunicode
docker-start
dwmstatusbar
eix-repos-sync
epylint
euscan
ext
f2py
f2py3
f2py3.6
f2py3.7
f2py3.8
flask
futurize
gentoo-test
geoip
get-meraki-network-list
getforecast
gfetch
gfg
git-delete-branch
git-init-folder
gswitch
haruhi-dl
iptables-restart
iptables-update
isort
jupyter-note
mailsync
mask2cidr
minecraft-launcher
mount-synology
mouse-set
night
notify-program
password-manager
pasteurize
pinger
pre-commit
pwiz.py
pylint
pyreverse
rasp
rcon
record
remove-kernel
runJava
saver-off
sb-battery
sb-clock
sb-cpu
sb-mail
sb-mem
sb-music
sb-network
sb-temp
sb-volume
sb-weather
screen-switcher
screenshot
screenshot-area
set-wallpaper
shut-sup-rest
sidebar-restore-macos
speedtest-cli
ssh-permissions
stream
suspend-at-time
symilar
tea
temp
term-wmi
tester-ebuild
tester-ubuntu
tmux-display-fix
trans
twitch
video-convert
volume
welcomer
welcomer-serwer
wheel
wsl-notify
wylaczoff
yatqa
youtube-dl
yt-mp3
yt-video
Library
.alacritty.yml
.gitconfig.local
.gitignore
.markdownlint.json
.signature
.skhdrc
.tmux.conf
.vimrc
.vimrc-def
.wall.jpg
.xinitrc
.yabairc
.zshrc
8 lines
559 B
Bash
Executable File
8 lines
559 B
Bash
Executable File
#!/bin/bash
|
|
print_weather() {
|
|
[ "$(stat -c %y "/home/yorune/.config/weatherreport" 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] && curl -s "wttr.in/$location" > "/home/yorune/.config/weatherreport"
|
|
|
|
printf "%s" "$(sed '16q;d' "/home/yorune/.config/weatherreport" | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')" && sed '13q;d' "/home/yorune/.config/weatherreport" | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print" ❄",$1"°","☀",$2"°"}'
|
|
}
|
|
print_weather
|