dotfiles-remastered/.config/polybar/wireguard-info.sh

25 lines
339 B
Bash
Executable File

#!/usr/bin/env sh
set -e
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
source "$SCRIPTPATH/wireguard-config.sh"
if nmcli connection show --active | grep "$ID_LIGHT" > /dev/null
then
echo -n 
exit 0
fi
if nmcli connection show --active | grep "$ID_FULL" > /dev/null
then
echo -n 聯
exit 0
fi
echo -n 輦