diff --git a/wire_g b/wire_g index 8333145..ab45a3b 100755 --- a/wire_g +++ b/wire_g @@ -106,12 +106,18 @@ remove(){ nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//' &> ${wg_wdir}.wg_noactive.txt active=$(cat ${wg_wdir}.wg_noactive.txt) - if selection=$(yad --no-click --list --height=300 --width=60 \ - --title="Wire-G Trash" --center \ - --fixed --buttons-layout=center \ - --button=$"OK" --button=$"Cancel" \ - --separator="" --window-icon=${wg_pic}wg-trash.png \ - --borders=8 --column=$"Delete" $tunnel) + if selection=$(yad --no-click --list --center \ + --window-icon=${wg_pic}wg-trash.png \ + --height=300 --width=60 --title="Wire-G Trash" \ + --fixed --buttons-layout=center --separator="" \ + --button=$"OK" --button=$"Cancel" \ + --borders=8 --image-on-top --image=${wg_pic}wg-active.png \ + --column=$"Delete" $tunnel \ + --text=$"Activ Tunnel: $active +---------------------------------------------------------------------------------- +If no tunnels are listed, +so they have to import their tunnel beforehand.") + then nmcli connection delete $selection &> ${wg_wdir}.tmp.txt success=$(grep -i 'erfolgreich gelöscht\|successfully deleted' ${wg_wdir}.tmp.txt)