home/config/waybar/modules/vpn_echo.sh

4 lines
191 B
Bash
Executable file

#!/bin/bash
ip addr | grep -q '10.10.10.2' \
&& echo '{"text":"Connected","class":"connected","percentage":100}' \
|| echo '{"text":"Disconnected","class":"disconnected","percentage":0}'