diff --git a/.tmp.txt b/.tmp.txt
new file mode 100644
index 0000000..d06462a
--- /dev/null
+++ b/.tmp.txt
@@ -0,0 +1 @@
+Fehler: weder eine gültige Verbindung noch ein Gerät angegeben.
diff --git a/wire_g b/wire_g
index 07fb963..ebbe65a 100755
--- a/wire_g
+++ b/wire_g
@@ -130,6 +130,15 @@ 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 --center \
+ --window-icon=${wg_pic}wg-trash.png \
+ --height=200 --width=60 --undecorated \
+ --buttons-layout=center --separator="" \
+ --button=$"OK" --button=$"Cancel" \
+ --borders=8 \
+ --column=$"Delete" $tunnel)
+
+ then
nmcli connection delete $selection &> ${wg_wdir}.tmp.txt
if success=$(grep -i 'erfolgreich gelöscht\|successfully deleted' ${wg_wdir}.tmp.txt)
then
@@ -149,9 +158,10 @@ remove(){
then
pkill wire_g
pkill yad
- fi }
+ fi
+ fi }
export -f remove
-
+
# function end
############################################################################################################
############################################################################################################
@@ -218,9 +228,9 @@ connect(){
if selection=$(yad --no-klick --list --center \
--height=300 --width=60 --title="Wire-G" \
--buttons-layout=center \
- --button=$"OK" --button=$"Stop":"bash -c up_or_down" \
+ --button=$"Start:0" --button=$"Stop":"bash -c up_or_down" \
--button=$"Import":"bash -c import_wg" \
- --form --field=$"Remove:0""bash -c remove" --separator="" \
+ --button=$"Remove":"bash -c remove" --separator="" \
--button=$"About":"bash -c about" \
--window-icon=${wg_pic}wg-vpn.png \
--borders=8 --image-on-top --image=${wg_pic}wg-active.png \
@@ -229,7 +239,6 @@ if selection=$(yad --no-klick --list --center \
----------------------------------------------------------------------------------
If no tunnels are listed,
so they have to import their tunnel beforehand.")
-export selection
then
if [[ -n $active ]]
then