Notify überarbeitet
This commit is contained in:
		
							
								
								
									
										25
									
								
								wire_g
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								wire_g
									
									
									
									
									
								
							| @@ -52,23 +52,14 @@ wg_notify(){ | ||||
|     notify-send --icon=${wg_pic}wg-vpn.png $"$active powered" | ||||
|     # autoconnect wird hier abgeschalten damit auch neu importierte nach einem Systemneustart nicht aktiv sind | ||||
|     nmcli con mod $active connection.autoconnect no | ||||
|     # ab hier beginnt yad notify | ||||
|     #Pipe erstellen | ||||
|     PIPE="$HOME/.pipe.tmp" | ||||
|     rm $PIPE > /dev/null 2>&1 | ||||
|     mkfifo $PIPE | ||||
|     exec 3<> $PIPE | ||||
|     #Yad Dialog erstellen | ||||
|     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 | ||||
|     #Name des Menüs definieren | ||||
|     echo "tooltip:$active $show" >&3 | ||||
|  | ||||
|     | ||||
|     yad --notification \ | ||||
|     --image="icon:${wg_pic}wg-vpn.png" \ | ||||
|     --icon-size=32 --no-middle \ | ||||
|     --text=$"$active $show" \ | ||||
|     --menu="Wire-G $open ! sbin/wire_g | ||||
|     $active stop!/sbin/wg_stop" \ | ||||
|     --command="menu" | ||||
| } | ||||
| export -f wg_notify | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user