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/"
|
wg_pic="/home/$a_user/.icons/"
|
||||||
case $LANG in
|
case $LANG in
|
||||||
|
|
||||||
de_DE.UTF-8) show=aktiv ;;
|
de_DE.UTF-8) show=aktiv & open=öffnen ;;
|
||||||
|
|
||||||
|
|
||||||
*) show=activ ;;
|
*) show=activ & open=open ;;
|
||||||
esac
|
esac
|
||||||
notify-send --icon=${wg_pic}wg-vpn.png $"$active powered"
|
notify-send --icon=${wg_pic}wg-vpn.png $"$active powered"
|
||||||
# autoconnect wird hier abgeschalten damit auch neu importierte nach einem Systemneustart nicht aktiv sind
|
# autoconnect wird hier abgeschalten damit auch neu importierte nach einem Systemneustart nicht aktiv sind
|
||||||
@ -59,9 +59,10 @@ wg_notify(){
|
|||||||
mkfifo $PIPE
|
mkfifo $PIPE
|
||||||
exec 3<> $PIPE
|
exec 3<> $PIPE
|
||||||
#Yad Dialog erstellen
|
#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
|
#Menüeinträge definieren
|
||||||
echo "menu:\
|
echo "menu:\
|
||||||
|
Wire-G open!/sbin/wire_g|
|
||||||
$active stop!/sbin/wg_stop| " >&3
|
$active stop!/sbin/wg_stop| " >&3
|
||||||
#Icon des Menübuttons definieren
|
#Icon des Menübuttons definieren
|
||||||
echo "icon:${wg_pic}wg-vpn.png" >&3
|
echo "icon:${wg_pic}wg-vpn.png" >&3
|
||||||
@ -105,9 +106,9 @@ import_wg(){
|
|||||||
fi
|
fi
|
||||||
fi ;;
|
fi ;;
|
||||||
|
|
||||||
*) yad --text-align=center --button=$"OK" --title=$"Wireguard .conf Select file" \
|
*) yad --button=$"OK" --title=$"Wireguard .conf Select file" \
|
||||||
--image-on-top --window-icon=${wg_pic}wg-stop.png --image=${wg_pic}wg-info.png \
|
--window-icon=${wg_pic}wg-stop.png --image=${wg_pic}wg-info.png \
|
||||||
--center --buttons-layout=center --borders=8 \
|
--center --buttons-layout=center --borders=8 --width=350 --height=60 \
|
||||||
--text $"<b>Oh, something went wrong.</b> \n
|
--text $"<b>Oh, something went wrong.</b> \n
|
||||||
<b>No valid Wireguard file.</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"
|
<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"
|
# function button "more"
|
||||||
|
|
||||||
more(){
|
about(){
|
||||||
a_user=$(whoami)
|
a_user=$(whoami)
|
||||||
wg_pic="/home/$a_user/.icons/"
|
wg_pic="/home/$a_user/.icons/"
|
||||||
version=3.1.2
|
version=3.1.2
|
||||||
selection=$(yad --height=100 --width=80 \
|
selection=$(yad --title="Wire-G" --center \
|
||||||
--title="Wire-G" --center \
|
|
||||||
--borders=8 --close-on-unfocus \
|
--borders=8 --close-on-unfocus \
|
||||||
--buttons-layout=center --text-align=center \
|
--buttons-layout=center --text-align=center \
|
||||||
--button=$"Import":"bash -c import_wg" \
|
--button=$"OK" --fixed \
|
||||||
--button=$"Wire-G Stop":"bash -c up_or_down" \
|
|
||||||
--button=$"Cancel":1 \
|
|
||||||
--separator="" --window-icon=${wg_pic}wg-vpn.png \
|
--separator="" --window-icon=${wg_pic}wg-vpn.png \
|
||||||
--text=$"<span color='#626ff1'><b>Wire-G Author: Désiré Werner Menrath</b></span> \n
|
--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
|
<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")
|
<a href='https://git.lunix.dedyn.io/punix/Wire-G'>Download Wire-G </a> \n")
|
||||||
|
|
||||||
}
|
}
|
||||||
export -f more
|
export -f about
|
||||||
|
|
||||||
# function end
|
# function end
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
@ -237,8 +235,9 @@ if selection=$(yad --no-click --list \
|
|||||||
--center \
|
--center \
|
||||||
--height=300 --width=60 --title="Wire-G" \
|
--height=300 --width=60 --title="Wire-G" \
|
||||||
--buttons-layout=center \
|
--buttons-layout=center \
|
||||||
--button=$"OK" --button=$"Cancel" \
|
--button=$"Start:0" --button=$"Stop":"bash -c up_or_down" \
|
||||||
--button=$"More":"bash -c more" --button=$"Remove":"bash -c remove" --separator="" \
|
--button=$"Import":"bash -c wg_import" --button=$"Remove":"bash -c remove" --separator="" \
|
||||||
|
--button=$"About":"bash -c about"
|
||||||
--window-icon=${wg_pic}wg-vpn.png \
|
--window-icon=${wg_pic}wg-vpn.png \
|
||||||
--borders=8 --image-on-top --image=${wg_pic}wg-active.png \
|
--borders=8 --image-on-top --image=${wg_pic}wg-active.png \
|
||||||
--column=$"Selection" $tunnel \
|
--column=$"Selection" $tunnel \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user