From aaa67ac623d78ab9da4519bf1626268fcb61b1ae Mon Sep 17 00:00:00 2001 From: Ryan Kes Date: Thu, 12 Mar 2020 01:36:30 +0100 Subject: [PATCH] left-click works again --- polybar/.config/polybar/config | 1 + wireguard/.local/bin/wireguard-switch | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index fc907c4..28d8552 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -443,6 +443,7 @@ click-right = sh ~/.config/polybar/bin/system-usb-udev --unmount & [module/wireguard] type = custom/script exec = ~/.config/polybar/bin/wireguard-status +;This doesn't work when run in the background for some reason click-left = ~/.local/bin/wireguard-switch [settings] diff --git a/wireguard/.local/bin/wireguard-switch b/wireguard/.local/bin/wireguard-switch index 9904385..82e4f95 100755 --- a/wireguard/.local/bin/wireguard-switch +++ b/wireguard/.local/bin/wireguard-switch @@ -8,11 +8,11 @@ STATUS="$(nmcli device status | grep -c wg0)" case $STATUS in 1) - sudo wg-quick down wg0 - notify-send.py -a wireguard --replaces-process wireguard -i network-vpn-offline-symbolic Wireguard "Connection down" + wg-quick down wg0 + notify-send.py -a wireguard --replaces-process wireguard-status -i network-vpn-offline-symbolic Wireguard "Connection down" & ;; *) - sudo wg-quick up wg0 - notify-send.py -a wireguard --replaces-process wireguard -i network-vpn-symbolic Wireguard "Connection up" + wg-quick up wg0 + notify-send.py -a wireguard --replaces-process wireguard-status -i network-vpn-symbolic Wireguard "Connection up" & ;; esac