home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e56795b68a23da2ab3df0120f66adfbcd6ff657e
parent 65e7029dd040c027fe647aaf27f1be5851861979
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Fri,  5 Jul 2019 10:31:21 +0200

scripts: use zenity for dialog box in redhat vpn

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Massets/redhat-vpn.desktop | 4++--
Mpkgs/scripts/bin/redhat-vpn | 5++---
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/assets/redhat-vpn.desktop b/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 diff --git a/pkgs/scripts/bin/redhat-vpn b/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