Browse Source

Added openvpn helpers

master
Micah Halter 2 months ago
parent
commit
fbffb3a95e

+ 1
- 0
CHANGELOG.md View File

@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9 9
 
10 10
 ### Added
11 11
 
12
+- Added openvpn helper scripts
12 13
 - Added vpn to statusbar
13 14
 - Added freenode irc to Weechat
14 15
 - `transfer.sh` alias now creates qr code if `qrencode` is installed

+ 2
- 0
Makefile View File

@@ -91,6 +91,7 @@ arch: pacman
91 91
 		ntp \
92 92
 		offlineimap \
93 93
 		openssh \
94
+		openvpn \
94 95
 		pandoc \
95 96
 		pandoc-citeproc \
96 97
 		pass \
@@ -175,6 +176,7 @@ aur: yay
175 176
 		ncpamixer \
176 177
 		nerd-fonts-inconsolata \
177 178
 		networkmanager-dmenu-git \
179
+		openvpn-update-systemd-resolved \
178 180
 		qutebrowser-git \
179 181
 		rtv \
180 182
 		sc-im \

+ 4
- 0
i3/.config/i3/config View File

@@ -146,6 +146,7 @@ exec_always --no-startup-id $HOME/.config/wpg/wp_init.sh
146 146
 # application placements
147 147
 assign [class="Google-chrome"] $workspace1
148 148
 assign [class="Firefox"] $workspace1
149
+assign [class="Brave"] $workspace1
149 150
 assign [class="qutebrowser"] $workspace1
150 151
 assign [class="Skype"] $workspace3
151 152
 assign [class="Telegram"] $workspace3
@@ -472,6 +473,9 @@ bindsym $mod+Scroll_Lock                exec --no-startup-id lock
472 473
 #bindsym $mod+Pause
473 474
 #bindsym $mod+Shift+Pause
474 475
 
476
+bindsym $mod+Home                       exec --no-startup-id toggleservice micahvpn
477
+#bindsym $mod+Shift+Home
478
+#
475 479
 bindsym $mod+Insert                     exec --no-startup-id bash screencast
476 480
 #bindsym $mod+Shift+Insert
477 481
 

+ 12
- 0
openvpn/.config/systemd/user/micahvpn.service View File

@@ -0,0 +1,12 @@
1
+[Unit]
2
+Description=mehalter.com OpenVPN
3
+Wants=network-online.target
4
+
5
+[Service]
6
+Type=simple
7
+Environment=DISPLAY=:0
8
+ExecStart=/home/micah/.config/Scripts/gohome
9
+ExecStop=sudo killall openvpn
10
+
11
+[Install]
12
+WantedBy=default.target

+ 3
- 0
scripts/.config/Scripts/gohome View File

@@ -0,0 +1,3 @@
1
+#!/bin/bash
2
+
3
+pass OpenVpn/micah | sudo openvpn --config ~/.openvpn/micah.ovpn --askpass /dev/stdin

+ 7
- 0
scripts/.config/Scripts/toggleservice View File

@@ -0,0 +1,7 @@
1
+#!/bin/bash
2
+
3
+service=$1
4
+
5
+systemctl --user is-active $service 2&> /dev/null && systemctl --user stop $service && notify-send "$service off" && exit
6
+
7
+systemctl --user start $service && notify-send "$service on"

+ 0
- 1
zsh/.zsh_aliases View File

@@ -188,7 +188,6 @@ gcclm() {
188 188
 }
189 189
 
190 190
 # unused aliases
191
-alias gohome='sudo openvpn --config $HOME/.openvpn/micah.ovpn'
192 191
 #alias gohome='sudo openvpn --script-security 2 --config $HOME/.openvpn/halter_home.ovpn'
193 192
 #alias dataBackup='$HOME/backupScript/backup.sh'
194 193
 #alias dataBackupUmount='$HOME/backupScript/backup.sh && sleep 5 && sudo umount /dev/sdd1'

Loading…
Cancel
Save