diff options
author | Joe <rrbo@proton.me> | 2023-03-31 11:58:18 +0200 |
---|---|---|
committer | Joe <rrbo@proton.me> | 2023-03-31 11:58:18 +0200 |
commit | 9f477b6c1a4b4332ec1f0b87b53c104d06c25fa1 (patch) | |
tree | 7911630c864217b031aeb6b150ff3ed312fceccd /.local/bin/conky | |
parent | up (diff) | |
download | dotfiles-bsd-9f477b6c1a4b4332ec1f0b87b53c104d06c25fa1.tar.gz dotfiles-bsd-9f477b6c1a4b4332ec1f0b87b53c104d06c25fa1.tar.bz2 dotfiles-bsd-9f477b6c1a4b4332ec1f0b87b53c104d06c25fa1.tar.xz dotfiles-bsd-9f477b6c1a4b4332ec1f0b87b53c104d06c25fa1.tar.zst dotfiles-bsd-9f477b6c1a4b4332ec1f0b87b53c104d06c25fa1.zip |
up
Diffstat (limited to '.local/bin/conky')
-rwxr-xr-x | .local/bin/conky/net.sh | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/.local/bin/conky/net.sh b/.local/bin/conky/net.sh index 863cfb7..2f5ab88 100755 --- a/.local/bin/conky/net.sh +++ b/.local/bin/conky/net.sh @@ -28,21 +28,12 @@ if grep up "/sys/class/net/$if_main/operstate" >/dev/null 2>&1 && ! [ -z $(ifcon elif grep up "/sys/class/net/$if_alt/operstate" >/dev/null 2>&1 && ! [ -z $(ifconfig $if_alt 2>/dev/null | awk '/inet / {print $2}') ]; then if_main=$if_alt else - echo '${color1}NET ${hr}${font} -${color1}No network${font}' - exit + : fi -echo -n $if_main -exit -echo '${color1}NET ${hr 2}${font} -${color1}Interface: ${color0}'$if_main'${font}' +echo $if_main'${font}' [ -z $if_wg ] || echo '${color1}WireGuard: ${color0}ON${font}' -echo '${color1}--------- -${color1}LAN IP: ${color0}${addr '$if_main'}${font}' -[ -z $if_wg ] || echo '${color1}WG IP: ${color0}${addr '$if_wg'}${font}' -echo '${color1}DNS IP: ${color0}${nameserver 0}${font}' -echo '${color1}WAN IP: ${color0}${execi 15 curl -s https://ifconfig.me || echo No WAN}${font} -${color1}--------- -${color1}D: ${color0}${downspeed '$if_main'}${font}${color1} -- Total: ${color0}${totaldown '$if_main'}${font} -${color1}U: ${color0}${upspeed '$if_main'}${font}${color1} -- Total: ${color0}${totalup '$if_main'}${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}' |