From a6f1537b1db554e2b67a4f13e3f0c74d56a7ed1f Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 4 Jul 2025 17:57:14 +0200 Subject: [PATCH] chore: update vpn.fish to use sudo --- .config/fish/config.fish | 2 ++ .config/fish/functions/vpn.fish | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/fish/config.fish b/.config/fish/config.fish index facfc42..0b7b9eb 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -11,6 +11,8 @@ if not test -d $_TEMP mkdir -p $_TEMP end +set -x GPG_TTY $(tty) + source ~/.config/fish/alias.fish source ~/.config/fish/prompt.fish diff --git a/.config/fish/functions/vpn.fish b/.config/fish/functions/vpn.fish index f665110..4a2ad3b 100644 --- a/.config/fish/functions/vpn.fish +++ b/.config/fish/functions/vpn.fish @@ -54,7 +54,7 @@ function vpn return 0 end - if wg-quick up $_path + if sudo wg-quick up $_path echo "true" > "$_TEMP/vpn-status" if not $_silent echo "Successfully enabled." @@ -71,7 +71,7 @@ function vpn return 0 end - if wg-quick down $_path + if sudo wg-quick down $_path echo "false" > "$_TEMP/vpn-status" if not $_silent echo "Successfully disabled." @@ -81,4 +81,4 @@ function vpn end return 2 -end \ No newline at end of file +end