Some modifications, tailscale scripts
This commit is contained in:
@ -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
10
i3/.config/i3blocks/tscale
Executable 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
|
Reference in New Issue
Block a user