index — dotfiles @ 8a3fab48c41d4d85f45f74b5a0806bf387cf515c

my dotfiles

add vpn
Christian Krinitsin mail@krinitsin.com
Sun, 01 Jun 2025 16:10:10 +0200
commit

8a3fab48c41d4d85f45f74b5a0806bf387cf515c

parent

b5f27af0a9539eae22a3296f1a72a312125112f1

3 files changed, 28 insertions(+), 0 deletions(-)

jump to
A bin/port-forwarding

@@ -0,0 +1,3 @@

+#!/usr/bin/env bash + +while true ; do date ; natpmpc -a 1 0 udp 60 -g 10.2.0.1 && natpmpc -a 1 0 tcp 60 -g 10.2.0.1 || { echo -e "ERROR with natpmpc command \a" ; break ; } ; sleep 45 ; done
A bin/vpn_toggle

@@ -0,0 +1,23 @@

+#!/usr/bin/env bash + +out=$(sudo wg) + +if [ "$1" == "-i" ] +then + if [ -n "$out" ] + then + notify-send "vpn is activated" + else + notify-send "vpn is deactivated" + fi + exit +fi + +if [ -n "$out" ] +then + sudo wg-quick down /etc/wireguard/schwitz.conf + echo "vpn is deactivated" +else + sudo wg-quick up /etc/wireguard/schwitz.conf + echo "vpn is activated" +fi
M sway/.config/sway/configsway/.config/sway/config

@@ -151,7 +151,9 @@ bindsym $mod+Ctrl+w exec random-wallpaper

bindsym $mod+u exec toggle_monitor_focus bindsym $mod+Shift+m exec prismlauncher -l 1.21.4 -s krinitsin.com bindsym $mod+Shift+g exec steam-launcher +bindsym $mod+Shift+v exec vpn_toggle -i +# screensharing exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway # autostart