Conky Showcase 2023

Back when I was an ISO maintainer - I utilized some scripts displaying network addresses on polybar.

The scripts can be used for conky as well.

The check-network-wan displays a shield next to the ip if a vpn is up.

The containing package is named manjaro-openbox-scripts

#!/bin/bash
# root.nix.dk
# polybar wan/vpn status script
#

broken=""
state1=""
state2=""
state3=""
connected=""
shield=""
wan=""
vpn=""

network=$(ip a | grep ' state UP' | cut -d' ' -f2 | cut -d':' -f1)
if [[ -z ${network} ]]; then
    echo ${wan} ${broken} ${state1}; sleep 0.5
    echo ${wan} ${broken} ${state2}; sleep 0.5
    echo ${wan} ${broken} ${state3}; sleep 0.5
else
    device=$(ip a | grep 'tun')
    if [[ -z $device ]]; then
        device=$(ip a | grep 'proton')
    fi

    if [[ ${device} == "" ]]; then
        echo ${wan} $(curl -s https://get.geojs.io/v1/ip)
    else
        echo ${shield} $(curl -s https://get.geojs.io/v1/ip)
    fi
fi
2 Likes