Trying out IVPN
The client doesn't depend on systemd nor NetworkManager. Excellent for an Artix user like me! Shoutout to Viktor from IVPN for the free trial (not sponsored)!
This commit is contained in:
parent
3d2385fd1b
commit
b90a360321
|
@ -20,12 +20,12 @@ This configuration depends on the following packages:
|
|||
- `doas`\*
|
||||
- `git`
|
||||
- `grimshot`
|
||||
- `ivpn` (daemon + CLI)
|
||||
- `mako`
|
||||
- `neovim`
|
||||
- `pavucontrol`
|
||||
- `pipewire`
|
||||
- `playerctl`
|
||||
- `protonvpn-cli-ng`
|
||||
- `python`
|
||||
- `stow`
|
||||
- `sway`
|
||||
|
@ -36,5 +36,5 @@ This configuration depends on the following packages:
|
|||
|
||||
\* If you prefer `sudo`, then change all instances of `doas` to `sudo`. They're mainly in the sway config file and in my `autostart.sh` script.
|
||||
|
||||
Also, you need to make a `doas`/`sudo` rule that allows you to execute `protonvpn`, `poweroff` and `reboot` without a password, otherwise the keybindings for those won't work.
|
||||
Also, you need to make a `doas`/`sudo` rule that allows you to execute `ivpn-service`, `poweroff` and `reboot` without a password, otherwise the keybindings for those won't work.
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ sleep 1
|
|||
echo -e "Making scripts executable..."
|
||||
|
||||
chmod +x sway/.config/sway/autostart.sh
|
||||
chmod +x waybar/.config/waybar/pvpn.sh
|
||||
chmod +x waybar/.config/waybar/ivpn.sh
|
||||
chmod +x waybar/.config/waybar/mediaplayer.py
|
||||
|
||||
sleep 1
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Replace doas with sudo below if you don't have doas.
|
||||
doas openvpn --config /etc/openvpn/client/dk.protonvpn.com.udp.ovpn --auth-user-pass /root/ovpn_creds.txt &
|
||||
sleep 5 # Wait for Waybar to fully load
|
||||
sway-launcher-desktop autostart &
|
||||
disown
|
||||
disown
|
||||
sleep 1
|
||||
|
||||
ivpn connect -ipv6tunnel -p wg -fastest \
|
||||
&& notify-send -u low "IVPN" "Successfully connected to IVPN server:\n$(ivpn status | sed -n 2p | xargs)" \
|
||||
|| notify-send -u critical "IVPN" "Failed to connect to IVPN\!"
|
||||
|
||||
sway-launcher-desktop autostart
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
# #
|
||||
###############################
|
||||
|
||||
# Start IVPN service
|
||||
exec doas ivpn-service # replace with doas with sudo if you don't have doas
|
||||
|
||||
# Make xdg-desktop-portal-wlr work properly
|
||||
exec dbus-update-activation-environment WAYLAND_DISPLAY
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// Choose the order of the modules
|
||||
"modules-left": ["idle_inhibitor", "sway/workspaces", "custom/media", "sway/mode"],
|
||||
"modules-center": ["clock"],
|
||||
"modules-right": ["custom/pvpn", "network", "pulseaudio", "cpu", "memory", "battery", "tray"],
|
||||
"modules-right": ["custom/ivpn", "network", "pulseaudio", "cpu", "memory", "battery", "tray"],
|
||||
// Modules configuration
|
||||
"sway/workspaces": {
|
||||
"disable-scroll": true,
|
||||
|
@ -114,11 +114,11 @@
|
|||
// "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
|
||||
"exec": "$HOME/.config/waybar/mediaplayer.py --player chromium 2> /dev/null" // Filter player based on name
|
||||
},
|
||||
"custom/pvpn": { // Custom status module for ProtonVPN
|
||||
"format": "{} ProtonVPN",
|
||||
"exec": "$HOME/.config/waybar/pvpn.sh",
|
||||
"custom/ivpn": { // Custom status module for IVPN
|
||||
"format": "{} IVPN",
|
||||
"exec": "$HOME/.config/waybar/ivpn.sh",
|
||||
"return-type": "json",
|
||||
"interval": 5,
|
||||
"on-click": "protonvpn refresh && env SUDO_USER=$USER doas protonvpn c -f"
|
||||
"interval": 1,
|
||||
"on-click": "ivpn connect -last"
|
||||
}
|
||||
}
|
||||
|
|
14
waybar/.config/waybar/ivpn.sh
Executable file
14
waybar/.config/waybar/ivpn.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
STATUS=`ivpn status | awk '{print "\\\n"$0}' | head -n -4`
|
||||
TOOLTIP=`echo -E ${STATUS} | cut -c 3-`
|
||||
CLASS=`echo ${STATUS} | grep 'VPN' | awk '{print $3}' | tr [:upper:] [:lower:]`
|
||||
TEXT=""
|
||||
|
||||
if [ "$CLASS" == "connected" ]; then
|
||||
TEXT="\uf084" # key
|
||||
else
|
||||
TEXT="\uf071" # exclamation-triangle
|
||||
fi
|
||||
|
||||
echo "{\"text\": \"${TEXT}\", \"tooltip\": \"${TOOLTIP}\", \"class\": \"${CLASS}\"}"
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if ip a show tun0 > /dev/null 2>&1; then
|
||||
CLASS="Connected"
|
||||
TEXT="\uf084" # key
|
||||
else
|
||||
TEXT="\uf071" # exclamation-triangle
|
||||
fi
|
||||
|
||||
echo "{\"text\": \"${TEXT}\", \"tooltip\": \"${CLASS}\", \"class\": \"${CLASS}\"}"
|
||||
|
|
@ -87,7 +87,7 @@ window#waybar.hidden {
|
|||
#mode,
|
||||
#idle_inhibitor,
|
||||
#mpd,
|
||||
#custom-pvpn{
|
||||
#custom-ivpn{
|
||||
padding: 0 4px;
|
||||
margin: 0 4px;
|
||||
color: @white;
|
||||
|
@ -215,12 +215,12 @@ label:focus {
|
|||
box-shadow: inset 0 3px @violet;
|
||||
}
|
||||
|
||||
#custom-pvpn {
|
||||
#custom-ivpn {
|
||||
color: @red;
|
||||
box-shadow: inset 0 3px @red;
|
||||
}
|
||||
|
||||
#custom-pvpn.Connected {
|
||||
#custom-ivpn.connected {
|
||||
color: @green;
|
||||
box-shadow: inset 0 3px @green;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue