summaryrefslogtreecommitdiff
path: root/.local/bin/vpnmenu
blob: a42d000b5152409d7774c5eec660f3cca1e46ada (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

region="$(piactl get regions | dmenu -p "Select Region: ")"
update=$(kill -36 $(pidof dwmblocks))

[ "$region" == "" ] && notify-send -a " VPN" "Operation aborted"
[ "$region" != "" ] && piactl set region "$region" &&
	$update && notify-send -a " VPN" "Changed region to $region" &&
	sleep 3 && $update
# Comment next line if not using the vpn dwmblock