Files
my_sway_konfig/config/waybar/vpn-status.sh
2025-12-17 18:10:08 +01:00

12 lines
260 B
Bash
Executable File

#!/bin/bash
# This script checks for a WireGuard interface.
WG_INTERFACE="wg0"
if ip link show "$WG_INTERFACE" &> /dev/null; then
# If the interface exists, VPN is on.
printf " VPN On\n"
else
# If not, VPN is off.
printf " VPN Off\n"
fi