diff options
author | Joe <rrbo@proton.me> | 2023-02-07 10:10:00 +0100 |
---|---|---|
committer | Joe <rrbo@proton.me> | 2023-02-07 10:10:00 +0100 |
commit | dae6ed88b8830c5166a9b525e2b6963e30a97a9f (patch) | |
tree | d4ffb130e084d01383d9b697c179ba1471e031e4 /.local/bin/conky | |
parent | up (diff) | |
download | dotfiles-bsd-dae6ed88b8830c5166a9b525e2b6963e30a97a9f.tar.gz dotfiles-bsd-dae6ed88b8830c5166a9b525e2b6963e30a97a9f.tar.bz2 dotfiles-bsd-dae6ed88b8830c5166a9b525e2b6963e30a97a9f.tar.xz dotfiles-bsd-dae6ed88b8830c5166a9b525e2b6963e30a97a9f.tar.zst dotfiles-bsd-dae6ed88b8830c5166a9b525e2b6963e30a97a9f.zip |
up
Diffstat (limited to '.local/bin/conky')
-rwxr-xr-x | .local/bin/conky/weather.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/.local/bin/conky/weather.sh b/.local/bin/conky/weather.sh new file mode 100755 index 0000000..273825c --- /dev/null +++ b/.local/bin/conky/weather.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +os=$(cat /tmp/os) + +case $os in + 1) + ping -c1 -w1 1.1.1.1 >/dev/null 2>&1 || exit + ;; + 2) + ping -c1 -w1 1.1.1.1 >/dev/null 2>&1 || exit + ;; + 3) + ping -c1 -t1 1.1.1.1 >/dev/null 2>&1 || exit + ;; +esac + +echo 'WEATHER ${hr} +${font2}${color #ebdbb2}${alignc}${exec curl wttr.in/Lyon?T0 --silent --max-time 3}${font}' |