From b11db7b745bdc11dee5eba41daec5f83800256fe Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Sun, 25 Sep 2022 17:16:01 +0200 Subject: [PATCH] Remove IVPN --- README.md | 7 +++---- sway/.config/sway/autostart.sh | 9 --------- sway/.config/sway/config.d/10_autoexec | 6 ++---- waybar/.config/waybar/config | 11 ++--------- waybar/.config/waybar/ivpn-reconnect.sh | 5 ----- waybar/.config/waybar/ivpn-status.sh | 9 --------- waybar/.config/waybar/style.css | 13 +------------ zsh/.config/zsh/.zlogout | 3 --- 8 files changed, 8 insertions(+), 55 deletions(-) delete mode 100755 sway/.config/sway/autostart.sh delete mode 100755 waybar/.config/waybar/ivpn-reconnect.sh delete mode 100755 waybar/.config/waybar/ivpn-status.sh diff --git a/README.md b/README.md index bc3ad9f..0b4ae6d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # My dotfiles -This is a collection of some of my dotfiles for my Linux systems. These +This is a collection of some of my dotfiles for my Linux systems. They work on Artix, Debian, Fedora and Ubuntu. To install: @@ -21,10 +21,9 @@ $ sudo ln -s $(which sudo) /usr/bin/doas ### Notes - You need to make `doas`/`sudo` rules that allow you to execute, - `poweroff` and `reboot` (and additionally `ivpn-service` and `pkill - "^ivpn-service$"` if you use IVPN) without a password, otherwise the + `poweroff` and `reboot` without a password, otherwise the keybindings and scripts for those won't work. -- The install script requires GNU Stow to work. +- The installation script requires GNU Stow to work. - Make sure to thoroughly examine these dotfiles and change them to your needs before using them. - See the READMEs in the individual subfolders here for special notes. diff --git a/sway/.config/sway/autostart.sh b/sway/.config/sway/autostart.sh deleted file mode 100755 index f3a384a..0000000 --- a/sway/.config/sway/autostart.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env dash - -sleep 1 - -ivpn connect -ipv6tunnel -p wg -fastest -filter_invert dk \ - && 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 diff --git a/sway/.config/sway/config.d/10_autoexec b/sway/.config/sway/config.d/10_autoexec index 775fe40..8c67dd5 100644 --- a/sway/.config/sway/config.d/10_autoexec +++ b/sway/.config/sway/config.d/10_autoexec @@ -1,7 +1,6 @@ # vi: ft=swayconfig # Start background services -exec doas ivpn-service exec mako exec pipewire exec pipewire-pulse @@ -18,6 +17,5 @@ exec swayidle -w \ before-sleep 'playerctl pause' \ before-sleep 'swaylock' -# Custom script for VPN connection before XDG autostart applications -# Also fixes tray icons not showing when app is started before Waybar is ready -exec ~/.config/sway/autostart.sh +# Fix tray icons not showing when app is started before Waybar is ready +exec sleep 2 && sway-launcher-desktop autostart diff --git a/waybar/.config/waybar/config b/waybar/.config/waybar/config index 7cf8eda..a71283a 100644 --- a/waybar/.config/waybar/config +++ b/waybar/.config/waybar/config @@ -4,9 +4,9 @@ "height": 36, // Waybar height (to be removed for auto height) // "width": 1280, // Waybar width // Choose the order of the modules - "modules-left": ["idle_inhibitor", "sway/workspaces", "custom/usb", "sway/mode"], + "modules-left": ["idle_inhibitor", "sway/workspaces", "sway/mode"], "modules-center": ["clock"], - "modules-right": ["custom/ivpn", "network", "pulseaudio", "backlight", "cpu", "memory", "battery", "tray"], + "modules-right": ["custom/usb", "network", "pulseaudio", "backlight", "cpu", "memory", "battery", "tray"], // Modules configuration "sway/workspaces": { "disable-scroll": true, @@ -107,13 +107,6 @@ "format": "{icon} {percent}%", "format-icons": ["", "", "", "", "", "", "", "", ""] }, - "custom/ivpn": { // Custom status module for IVPN - "format": "{} IVPN", - "exec": "$HOME/.config/waybar/ivpn-status.sh", - "return-type": "json", - "interval": 1, - "on-click": "$HOME/.config/waybar/ivpn-reconnect.sh" - }, "custom/usb": { "format": "{} USB", "exec": "$HOME/.config/waybar/usb-status.sh", diff --git a/waybar/.config/waybar/ivpn-reconnect.sh b/waybar/.config/waybar/ivpn-reconnect.sh deleted file mode 100755 index 2d864c5..0000000 --- a/waybar/.config/waybar/ivpn-reconnect.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env dash - -ivpn connect -last \ - && notify-send -u low "IVPN" "Successfully reconnected to IVPN server:\n$(ivpn status | sed -n 2p | xargs)" \ - || notify-send -u critical "IVPN" "Failed to reconnect to IVPN\!" diff --git a/waybar/.config/waybar/ivpn-status.sh b/waybar/.config/waybar/ivpn-status.sh deleted file mode 100755 index 704438d..0000000 --- a/waybar/.config/waybar/ivpn-status.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env dash - -STATUS=`ivpn status | awk '{print "\\\n"$0}'` -TOOLTIP=`env echo -E ${STATUS} | cut -c 3-` -CLASS=`env echo ${STATUS} | grep 'VPN' | awk '{print $3}' | tr [:upper:] [:lower:]` - -[ "$CLASS" = "connected" ] && TEXT="\uf084" || TEXT="\uf071" - -env echo "{\"text\": \"${TEXT}\", \"tooltip\": \"${TOOLTIP}\", \"class\": \"${CLASS}\"}" diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css index 4d2367e..24f272a 100644 --- a/waybar/.config/waybar/style.css +++ b/waybar/.config/waybar/style.css @@ -89,7 +89,6 @@ window#waybar.hidden { #mode, #idle_inhibitor, #mpd, -#custom-ivpn, #custom-usb { padding: 0 4px; margin: 0 4px; @@ -200,21 +199,11 @@ label:focus { box-shadow: inset 0 3px @violet; } -#custom-ivpn { - color: @red; - box-shadow: inset 0 3px @red; -} - -#custom-ivpn.connected { +#custom-usb { color: @green; box-shadow: inset 0 3px @green; } -#custom-usb { - color: @orange; - box-shadow: inset 0 3px @orange; -} - #custom-usb.unprotected { color: @red; box-shadow: inset 0 3px @red; diff --git a/zsh/.config/zsh/.zlogout b/zsh/.config/zsh/.zlogout index 917fcb2..6a5bcd8 100644 --- a/zsh/.config/zsh/.zlogout +++ b/zsh/.config/zsh/.zlogout @@ -1,7 +1,4 @@ kill_services() { - pgrep "^ivpn-service$" && ivpn disconnect - doas pkill "^ivpn-service$" - pkill "^mako$" pkill "^wireplumber$" pkill "^pipewire-pulse$"