summaryrefslogtreecommitdiff
path: root/.local/bin/vpnmenu
blob: ff584e0c74915366dffec760a6fc9817af9b35bb (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