From dc19899900d6bdb308c2b2656df9816c608eb211 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Thu, 24 Aug 2023 21:27:48 -0700 Subject: notify when toggle VPN, avoid mistype --- config.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 2c95532..c288bda 100644 --- a/config.def.h +++ b/config.def.h @@ -128,7 +128,7 @@ static const Key keys[] = { // Use "$(xsel -op)" instead of "xsel -op | sdcv" (with sh -c?) because: the latter won't quit if found items similar and require user input. Not sure why. // use env inside, to fix a bug: alacritty created by `alacritty msg create-window` will quit immediately if result is less than one page. { MODKEY, XK_s, spawn, SHCMD("alacritty -e env LESS=\"$LESS-+F\" sdcv --color \"$(xsel -op)\"") }, - { MODKEY, XK_v, spawn, SHCMD("if nmcli -t --fields device,state device | grep -q '^wg0:connected$'; then nmcli connection down wg0; else nmcli connection up wg0; fi") }, + { MODKEY, XK_v, spawn, SHCMD("if nmcli -t --fields device,state device | grep -q '^wg0:connected$'; then nmcli connection down wg0; notify-send -u critical 'VPN disabled'; else nmcli connection up wg0; notify-send 'VPN enabled'; fi") }, { MODKEY, XK_w, spawn, SHCMD("\"$BROWSER\"") }, { MODKEY, XK_x, spawn, SHCMD("sleep 0.3; xcross") }, { MODKEY, XK_y, spawn, SHCMD("mpvy -s") }, -- cgit v1.2.3-70-g09d2