diff --git a/wire_g b/wire_g index 6912d61..6b2c3c0 100755 --- a/wire_g +++ b/wire_g @@ -44,10 +44,10 @@ wg_notify(){ wg_pic="/home/$a_user/.icons/" case $LANG in - de_DE.UTF-8) show=aktiv ;; + de_DE.UTF-8) show=aktiv & open=öffnen ;; - *) show=activ ;; + *) show=activ & open=open ;; esac notify-send --icon=${wg_pic}wg-vpn.png $"$active powered" # autoconnect wird hier abgeschalten damit auch neu importierte nach einem Systemneustart nicht aktiv sind @@ -59,9 +59,10 @@ wg_notify(){ mkfifo $PIPE exec 3<> $PIPE #Yad Dialog erstellen - yad --notification --listen --command=wire_g --icon-size=32 --no-middle <&3 & + yad --notification --listen --command= --icon-size=32 --no-middle <&3 & #Menüeinträge definieren echo "menu:\ + Wire-G open!/sbin/wire_g| $active stop!/sbin/wg_stop| " >&3 #Icon des Menübuttons definieren echo "icon:${wg_pic}wg-vpn.png" >&3 @@ -105,9 +106,9 @@ import_wg(){ fi fi ;; - *) yad --text-align=center --button=$"OK" --title=$"Wireguard .conf Select file" \ - --image-on-top --window-icon=${wg_pic}wg-stop.png --image=${wg_pic}wg-info.png \ - --center --buttons-layout=center --borders=8 \ + *) yad --button=$"OK" --title=$"Wireguard .conf Select file" \ + --window-icon=${wg_pic}wg-stop.png --image=${wg_pic}wg-info.png \ + --center --buttons-layout=center --borders=8 --width=350 --height=60 \ --text $"Oh, something went wrong. \n No valid Wireguard file. \n Here is an example: my_wireguard.conf \n" @@ -193,17 +194,14 @@ export -f up_or_down ############################################################################################################ # function button "more" -more(){ +about(){ a_user=$(whoami) wg_pic="/home/$a_user/.icons/" version=3.1.2 - selection=$(yad --height=100 --width=80 \ - --title="Wire-G" --center \ + selection=$(yad --title="Wire-G" --center \ --borders=8 --close-on-unfocus \ --buttons-layout=center --text-align=center \ - --button=$"Import":"bash -c import_wg" \ - --button=$"Wire-G Stop":"bash -c up_or_down" \ - --button=$"Cancel":1 \ + --button=$"OK" --fixed \ --separator="" --window-icon=${wg_pic}wg-vpn.png \ --text=$"Wire-G Author: Désiré Werner Menrath \n E-Mail: polunga40@unity-mail.de \n @@ -213,7 +211,7 @@ more(){ Download Wire-G \n") } -export -f more +export -f about # function end ############################################################################################################ @@ -237,8 +235,9 @@ if selection=$(yad --no-click --list \ --center \ --height=300 --width=60 --title="Wire-G" \ --buttons-layout=center \ - --button=$"OK" --button=$"Cancel" \ - --button=$"More":"bash -c more" --button=$"Remove":"bash -c remove" --separator="" \ + --button=$"Start:0" --button=$"Stop":"bash -c up_or_down" \ + --button=$"Import":"bash -c wg_import" --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 \ --column=$"Selection" $tunnel \