aboutsummaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2023-08-24 21:27:48 -0700
committerXiao Pan <gky44px1999@gmail.com>2023-08-24 21:27:48 -0700
commitdc19899900d6bdb308c2b2656df9816c608eb211 (patch)
treef8c2cc4f8b8495962942cdf1e3cb4bfd74274e2a /config.def.h
parent2871e5b30780bff9fa142cb43034f61b44099e1d (diff)
notify when toggle VPN, avoid mistype
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h2
1 files changed, 1 insertions, 1 deletions
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") },