home/config/waybar/modules/vpn_echo.sh

5 lines
191 B
Bash
Raw Normal View History

2022-11-14 09:04:01 +01:00
#!/bin/bash
ip addr | grep -q '10.10.10.2' \
&& echo '{"text":"Connected","class":"connected","percentage":100}' \
|| echo '{"text":"Disconnected","class":"disconnected","percentage":0}'