Fenster umgebaut Dateiprüfung entfernt
This commit is contained in:
parent
6de72b969a
commit
86fc92a4d5
29
wire_g
29
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 $"<b>Oh, something went wrong.</b> \n
|
||||
<b>No valid Wireguard file.</b> \n
|
||||
<b>Here is an example:</b><span color='#0fad0a'><b> my_wireguard.conf</b></span> \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=$"<span color='#626ff1'><b>Wire-G Author: Désiré Werner Menrath</b></span> \n
|
||||
<span color='#626ff1'><b>E-Mail: polunga40@unity-mail.de</b></span> \n
|
||||
@ -213,7 +211,7 @@ more(){
|
||||
<a href='https://git.lunix.dedyn.io/punix/Wire-G'>Download Wire-G </a> \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 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user