case insensitve dmenuvpn selection

This commit is contained in:
Alexander Bocken 2021-01-21 11:29:06 +01:00
parent 8cff4b256f
commit 19b0e452f3
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

View File

@ -4,7 +4,7 @@ USER='alexander@bocken.org'
ETH_user="abocken@student-net.ethz.ch"
ETH_password_path="ETH/VPN"
choice="$(ls "${XDG_CONFIG_HOME}/openvpn/cfgs" | sed 's/\.ovpn//' | awk 'BEGIN {print "ETH"}; {print $0}' | dmenu -p 'connect with which vpn server?' -l 10)"
choice="$(ls "${XDG_CONFIG_HOME}/openvpn/cfgs" | sed 's/\.ovpn//' | awk 'BEGIN {print "ETH"}; {print $0}' | dmenu -i -p 'connect with which vpn server?' -l 10)"
[ -z "$choice" ] && exit
if [ "$choice" = "ETH" ]; then
if [ $(pgrep -c openconnect) -eq 0 ]; then