Some modifications, tailscale scripts

This commit is contained in:
2025-04-15 23:47:59 +03:00
parent e7fc369f31
commit 933c5e3dac
20 changed files with 131 additions and 526 deletions

View File

@ -19,10 +19,11 @@ command=~/.dotfiles/bin/battery 1
interval=30
[tailscale]
command=echo TS: $(ip a show tailscale0 | rg "inet (\d+\.\d+\.\d+\.\d+)" -or '$1')
command=~/.config/i3blocks/tscale #echo TS: $(ip a show tailscale0 | rg "inet (\d+\.\d+\.\d+\.\d+)" -or '$1')
interval=30
[wthr]
color=#c0c0c0
command=curl -Ss 'https://wttr.in?0&T&Q' | cut -c 16- | head -2 | xargs echo
interval=3600
@ -32,5 +33,5 @@ label=lang:
interval=1
[time]
command=date '+%Y-%m-%d %H:%M:%S'
interval=1
command=date '+%d.%m.%Y %H:%M'
interval=10

10
i3/.config/i3blocks/tscale Executable file
View File

@ -0,0 +1,10 @@
#!/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