notify-send entfernt
This commit is contained in:
24
wire_g
24
wire_g
@ -46,9 +46,13 @@ wg_notify(){
|
||||
|
||||
*) OPEN=open ;;
|
||||
esac
|
||||
notify-send --icon=${WG_PIC}wg-vpn.png $"$ACTIVE powered"
|
||||
yad --image-on-top --image=${WG_PIC}wg-vpn-info.png \
|
||||
--undecorated --borders=8 --skip-taskbar \
|
||||
--text-align=center --no-buttons \
|
||||
--timeout 4 --timeout-indicator=bottom \
|
||||
--text=$"<span color='#0fad0a'><b>"$ACTIVE" powered</b></span>"
|
||||
# autoconnect wird hier abgeschalten damit auch neu importierte nach einem Systemneustart nicht aktiv sind
|
||||
nmcli con mod $active connection.autoconnect no
|
||||
nmcli con mod "$ACTIVE" connection.autoconnect no
|
||||
|
||||
yad --notification \
|
||||
--image="${WG_PIC}wg-vpn.png" \
|
||||
@ -96,7 +100,7 @@ import_wg(){
|
||||
|
||||
*) yad --image-on-top --image=${WG_PIC}wg-info.png --height=150 --width=240 \
|
||||
--text-align=center --undecorated --skip-taskbar \
|
||||
--borders=12 --button="OK" --buttons-layout=center \
|
||||
--borders=12 --button="OK" --buttons-layout=center --center \
|
||||
--text $"<b>Oh, something went wrong. No valid Wireguard file. </b> \n
|
||||
<b>Here is an example:</b><span color='#0fad0a'><b> my_wireguard.conf</b></span>"
|
||||
import_wg ;;
|
||||
@ -117,17 +121,17 @@ remove(){
|
||||
nmcli connection delete $SELECTION &> ${WG_WDIR}.tmp.txt
|
||||
if SUCCESS=$(grep -i 'erfolgreich gelöscht\|successfully deleted' ${WG_WDIR}.tmp.txt)
|
||||
then
|
||||
yad --window-icon=${WG_PIC}wg-trash.png \
|
||||
yad --window-icon=${WG_PIC}wg-trash.png --undecorated \
|
||||
--image-on-top --image=${WG_PIC}wg-info.png \
|
||||
--text=$"Your Tunnel $SELECTION was successfully deleted." \
|
||||
--text-align=center --button=$"OK" --title "Wire-G Trash" \
|
||||
--text-align=center --button=$"OK" \
|
||||
--center --buttons-layout=center --borders=8
|
||||
else
|
||||
yad --window-icon=${WG_PIC}wg-trash.png \
|
||||
yad --window-icon=${WG_PIC}wg-trash.png --undecorated \
|
||||
--image-on-top --image=${WG_PIC}wg-info.png \
|
||||
--text=$"Oh something went wrong.\nPlease delete Tunnel in the network manager." \
|
||||
--text-align=center --button=$"OK" --title "Wire-G Trash" \
|
||||
--center --buttons-layout=center --borders=8
|
||||
--text-align=center --button=$"OK" --height=60 --width=350 \
|
||||
--buttons-layout=center --borders=8 --fixed
|
||||
fi
|
||||
|
||||
if [ "$SELECTION" = "$ACTIVE" ]
|
||||
@ -147,7 +151,7 @@ up_or_down(){
|
||||
if [[ -z $ACTIVE ]]
|
||||
then
|
||||
yad --image-on-top --image=${WG_PIC}wg-info.png \
|
||||
--text=$"\There is no active Tunnel that you could stop." \
|
||||
--text=$"There is no active Tunnel that you could stop." \
|
||||
--text-align=center --no-buttons \
|
||||
--borders=8 --undecorated \
|
||||
--timeout 4 --timeout-indicator=bottom --skip-taskbar
|
||||
@ -210,7 +214,7 @@ SELECTION=$(yad --no-klick --list --center \
|
||||
--borders=8 --image-on-top --image=${WG_PIC}wg-active.png \
|
||||
--column=$"Selection" $TUNNEL \
|
||||
--text=$"<b>Activ Tunnel: </b> <span color='#0fad0a'><b>$ACTIVE</b></span>
|
||||
<b>----------------------------------------------------------------------------------</b>
|
||||
<b>------------------------------------------------------------------------------------------</b>
|
||||
<b>If no Tunnels are listed,</b>
|
||||
<b>so they have to import their Tunnel beforehand.</b>")
|
||||
RET=$?
|
||||
|
Reference in New Issue
Block a user