Update '.config/tmux/myip.sh'

This commit is contained in:
2023-05-27 20:33:03 +02:00
parent b8bebc034c
commit 7fd2b80d2f

View File

@@ -6,18 +6,12 @@ function get_ip {
INTERFACES=$( ip a show | grep -E "^[0-9]{0,3}:" | cut -d ' ' -f 2 | cut -d : -f 1 )
local _length
_length=60
for ni in $INTERFACES
do
if [[ $ni != "lo" ]] && [[ ! $ni =~ "veth" ]] && [[ ! $ni =~ "br-" ]] && [[ ! $ni =~ "docker_" ]]; then
IP="$(get_ip $ni)"
if [[ ! -z $IP ]]; then
echo -n " #[fg=#${COLOR_ACCENT}]$ni #[fg=white]$IP"
_length=$(($_length + 30))
fi
fi
done
export TMUX_LENGTH="$_length"
done