diff options
author | Joe <rbo@gmx.us> | 2024-10-16 11:32:15 +0200 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-10-16 11:32:15 +0200 |
commit | db5143d3b09e32c7880c61087a8a5abdc7f88364 (patch) | |
tree | df0518a9b31d856231d9d9e2918ef304ef432eae /.local | |
parent | up (diff) | |
download | dotfiles-bsd-db5143d3b09e32c7880c61087a8a5abdc7f88364.tar.gz dotfiles-bsd-db5143d3b09e32c7880c61087a8a5abdc7f88364.tar.bz2 dotfiles-bsd-db5143d3b09e32c7880c61087a8a5abdc7f88364.tar.xz dotfiles-bsd-db5143d3b09e32c7880c61087a8a5abdc7f88364.tar.zst dotfiles-bsd-db5143d3b09e32c7880c61087a8a5abdc7f88364.zip |
up
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/conky/net.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/.local/bin/conky/net.sh b/.local/bin/conky/net.sh index cde73a0..c4ea3fd 100755 --- a/.local/bin/conky/net.sh +++ b/.local/bin/conky/net.sh @@ -8,6 +8,7 @@ case "$(hostname -s)" in po-rbo) if_main="enx34298f762de7" if_alt="wlp1s0" + if_vpnssl="vpn0" ;; mars) if_main="em0" @@ -31,9 +32,17 @@ else : fi +if [ -z $if_vpnssl ]; then + : +elif ip a | grep $if_vpnssl | grep DOWN >/dev/null 2>&1; then + if_vpnssl="" +fi + echo $if_main'${font}' [ -z $if_wg ] || echo '${color1}WireGuard ${color0}ON${font}' -[ -z $if_wg ] || echo '${color1}WG IP ${color0}${goto 70}${addr '$if_wg'}${font}' -echo '${voffset 3}${color1}LAN IP ${color0}${goto 70}${addr '$if_main'}${font}' -echo '${color1}DNS IP ${color0}${goto 70}${nameserver 0}${font}' -echo '${color1}WAN IP ${color0}${goto 70}${execi 15 curl -s https://ifconfig.me || echo No WAN}${font}' +[ -z $if_wg ] || echo '${color1}WG IP ${color0}${goto 80}${addr '$if_wg'}${font}' +[ -z $if_vpnssl ] || echo '${color1}Forti VPN-SSL ${color0}ON${font}' +[ -z $if_vpnssl ] || echo '${color1}VPN IP ${color0}${goto 80}${addr '$if_vpnssl'}${font}' +echo '${voffset 3}${color1}LAN IP ${color0}${goto 80}${addr '$if_main'}${font}' +echo '${color1}DNS IP ${color0}${goto 80}${nameserver 0}${font}' +echo '${color1}WAN IP ${color0}${goto 80}${execi 15 curl -s https://ifconfig.me || echo No WAN}${font}' |