From 58d8e8fadda8ab21fae6501e4381a3e7252412aa Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 14 Oct 2020 16:36:21 +0200 Subject: [PATCH] wireguard polybar put ids in config --- .config/polybar/wireguard-info.sh | 7 +++++-- .config/polybar/wireguard-switch.sh | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.config/polybar/wireguard-info.sh b/.config/polybar/wireguard-info.sh index f74f755..cc41b79 100755 --- a/.config/polybar/wireguard-info.sh +++ b/.config/polybar/wireguard-info.sh @@ -2,8 +2,11 @@ set -e -ID_LIGHT="0f9ed364-1b54-4a95-a45a-a24114f5be6b" -ID_FULL="fa9f53b2-29b4-4c0e-80ca-38937ef8cad8" + +SCRIPT=$(readlink -f "$0") +SCRIPTPATH=$(dirname "$SCRIPT") + +source "$SCRIPTPATH/wireguard-config.sh" if nmcli connection show --active | grep "$ID_LIGHT" > /dev/null then diff --git a/.config/polybar/wireguard-switch.sh b/.config/polybar/wireguard-switch.sh index dad3847..cdbaa31 100755 --- a/.config/polybar/wireguard-switch.sh +++ b/.config/polybar/wireguard-switch.sh @@ -2,8 +2,10 @@ set -e -ID_LIGHT="0f9ed364-1b54-4a95-a45a-a24114f5be6b" -ID_FULL="fa9f53b2-29b4-4c0e-80ca-38937ef8cad8" +SCRIPT=$(readlink -f "$0") +SCRIPTPATH=$(dirname "$SCRIPT") + +source "$SCRIPTPATH/wireguard-config.sh" if nmcli connection show --active | grep "$ID_LIGHT" > /dev/null then