Commit e56795b68a23
Changed files (2)
assets
pkgs
scripts
bin
assets/redhat-vpn.desktop
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=Red Hat VPN
-Exec=gnome-terminal -- redhat-vpn
+Exec=redhat-vpn
Type=Application
-Terminal=true
+Terminal=false
Categories=System;
Icon=seahorse;
\ No newline at end of file
pkgs/scripts/bin/redhat-vpn
@@ -3,8 +3,7 @@
# This will ask for which VPN to connect (using available tools) and
# do some magic
set -e
-export BEMENU_BACKEND=curses
-connection=$(nmcli connection show | grep vpn | nix run nixpkgs.bemenu -c bemenu)
+connection=$(nmcli connection show | grep vpn | zenity --list --title "Red Hat VPNs" --text "Choose your VPN.." --column "Name" --width=600 --height=450)
uuid=$(echo ${connection} | awk '{print $3}')
name=$(echo ${connection} | awk '{print $1 $2}')
VPNSTATUS=$(nmcli connection show --active $uuid | wc -l)
@@ -17,7 +16,7 @@ then
gpg --decrypt $HOME/desktop/documents/Red\ Hat/naruhodo.pass.gpg 2>/dev/null >>$passfile
echo -n "${key}" >> $passfile
- nmcli connection up ${connection} passwd-file $passfile
+ nmcli connection up ${uuid} passwd-file $passfile
rm $passfile
notify-send "VPN ${name} is connected." "You are now connected to the Red Hat VPN, let's work !"
else