From 0860db73ae6fd9a6f6347219d820bf026a6b8b91 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Sun, 27 Sep 2026 17:38:39 +0200 Subject: * MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated-commit-by: dots Signed-off-by: Robert Günzler --- .config/waybar/module-tailscale.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to '.config/waybar/module-tailscale.sh') diff --git a/.config/waybar/module-tailscale.sh b/.config/waybar/module-tailscale.sh index 53b0409..3a2ce75 100755 --- a/.config/waybar/module-tailscale.sh +++ b/.config/waybar/module-tailscale.sh @@ -15,16 +15,19 @@ update() { alt="$ts_acct" class="$ts_acct" + tip="$ts_ip" # only display account name when not "main" [ "$ts_acct" = "main" ] || text=$ts_acct - if tailscale exit-node list | grep -q selected; then + en_name=$(tailscale exit-node list | grep selected) + if test -n "$en_name"; then alt="exit-node" class="exit-node" + tip="$(awk '{printf "%s (%s)", $2, $1}' <<<"$en_name")" fi jq -nrc '{text:$text,tooltip:$tip,class:$class,alt:$alt}' \ - --arg tip "${ts_ip:?}" \ + --arg tip "${tip:?}" \ --arg class "${class:?}" \ --arg alt "${alt:?}" \ --arg text "${text:-}" -- cgit 1.4.1