dotfiles/.local/bin/statusbar/sb-vpn
2025-03-15 13:52:06 +03:00

19 lines
281 B
Bash
Executable file

#!/bin/bash
PIPE="/var/run/vpnd.sock"
send_cmd() {
[ -p $PIPE ] && echo "$@" > $PIPE && \
cat < $PIPE
}
IFNAME="$(send_cmd status)"
case "$IFNAME" in
"msk") IFNAME="Moscow";;
"rix") IFNAME="Riga";;
esac
if [ -n "$IFNAME" ]; then
echo "󰦝 $IFNAME"
fi