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

@ -8,12 +8,23 @@
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
# class border bground text indicator child_border
client.focused #f020f0 #301040 #FFFFD0 #2E9EF4 #f020f0
client.focused_inactive #333333 #5F676A #FFFFFF #484E50 #5F676A
client.unfocused #333333 #111111 #666666 #292D2E #222222
client.urgent #2F343A #900000 #FFFFFF #900000 #900000
client.placeholder #000000 #0C0C0C #FFFFFF #000000 #0C0C0C
client.background #42165C
default_border pixel 8
title_align center
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:IosevkaTerm NF 14
font pango:IosevkaTerm NF 18
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
@ -198,5 +209,8 @@ bindsym $mod+Shift+v mode "launch"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
colors {
background #301040
}
status_command i3blocks
}

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