Files
dotfiles/i3/.config/i3blocks/tscale

11 lines
289 B
Bash
Executable File

#!/bin/bash
exitnode=$(tailscale status --json | jq .ExitNodeStatus)
enstatus="enode: off"
[ "$exitnode" = "null" ] || enstatus="enode: on"
echo TS: $(ip a show tailscale0 | rg "inet (\d+\.\d+\.\d+\.\d+)" -or '$1') $enstatus
case $BLOCK_BUTTON in
1) ~/.dotfiles/bin/rofi-tscale ;;
esac