aboutsummaryrefslogtreecommitdiff
path: root/.config/waybar/scripts/vpn-toggle
diff options
context:
space:
mode:
authorawy <awy@tutamail.com>2024-08-14 22:51:37 +0300
committerawy <awy@tutamail.com>2024-08-14 22:51:37 +0300
commit88d959b959e4e7e05755b7f340829e4241c625b8 (patch)
treebaa426738c215ec96feb3c66b8af7ee5f4926c2c /.config/waybar/scripts/vpn-toggle
parentba0d4321e1ca37708258b9097bd5b76d0ce050c7 (diff)
vpn
Diffstat (limited to '.config/waybar/scripts/vpn-toggle')
-rwxr-xr-x.config/waybar/scripts/vpn-toggle8
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/waybar/scripts/vpn-toggle b/.config/waybar/scripts/vpn-toggle
new file mode 100755
index 0000000..4b48203
--- /dev/null
+++ b/.config/waybar/scripts/vpn-toggle
@@ -0,0 +1,8 @@
+#!/bin/sh
+if [ -d /sys/class/net/wg0 ]; then
+ doas wg-quick down wg0
+ hyprctl notify 5 5000 "rgb(ff0000)" " VPN is disabled"
+else
+ doas wg-quick up wg0
+ hyprctl notify 5 5000 "rgb(008000)" " VPN is enabled"
+fi