refactored batteries script, tscale_native uses core utils instead of rg and jq

This commit is contained in:
Vlad
2026-01-11 00:00:21 +03:00
parent 63a24620d8
commit 2fe354a1bd
5 changed files with 74 additions and 3 deletions

20
i3/.config/i3blocks/workvpn Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
status=$(ip a show ppp1 2>/dev/null || "")
[ -z "$status" ] && exit 0
icon=󱁤
color="#808080"
text=""
ip=$(grep -Po 'inet \K(\d+\.){3}\d+' <<<$status)
if [ -z "$ip" ]; then
text="$icon wait..."
color="#ffff00"
else
text="$icon $ip"
color="#80ff80"
fi
echo "$text"
echo "$text"
echo "$color"