Files
nix/dots/.bin/sb-wg
T
hektor 71725ce35b Add 'dots/' from commit '357b97a7692c8d5ec9666d8d7d7c98d81cb51cf0'
git-subtree-dir: dots
git-subtree-mainline: 2ad98cde17
git-subtree-split: 357b97a769
2025-10-04 18:28:04 +02:00

13 lines
300 B
Bash
Executable File

#!/usr/bin/env sh
# Reference: https://github.com/mil-ad/polybar-wireguard
connected_interfaces=$(networkctl | grep -P "\d+ .* wireguard routable" -o | cut -d" " -f2)
if [ -n "$connected_interfaces" ];
then
for interface in $connected_interfaces; do echo "$interface"; done
else
exit 1
fi