diff --git a/zsh/.config/zsh/.zlogout b/zsh/.config/zsh/.zlogout index fe97b95..20dbefe 100644 --- a/zsh/.config/zsh/.zlogout +++ b/zsh/.config/zsh/.zlogout @@ -1,11 +1,13 @@ -if [[ $(tty) == /dev/tty1 ]] && [[ $(lsb_release -si) == Artix ]]; then - { - pgrep "^ivpn-service$" && ivpn disconnect - doas pkill "^ivpn-service$" +function kill_services { + pgrep "^ivpn-service$" && ivpn disconnect + doas pkill "^ivpn-service$" - pkill "^mako$" - pkill "^pipewire$" - pkill "^pipewire-pulse$" - pkill "^wireplumber$" - } &> /dev/null -fi + pkill "^mako$" + pkill "^wireplumber$" + pkill "^pipewire-pulse$" + pkill "^pipewire$" +} + +[[ $(tty) == /dev/tty1 ]] && [[ $(lsb_release -si) == Artix ]] && + kill_services &> /dev/null +unfunction kill_services diff --git a/zsh/.config/zsh/.zprofile b/zsh/.config/zsh/.zprofile index 2b21955..40c7848 100644 --- a/zsh/.config/zsh/.zprofile +++ b/zsh/.config/zsh/.zprofile @@ -4,6 +4,5 @@ if [[ $(tty) == /dev/tty1 ]] && [[ $(lsb_release -si) == Artix ]]; then export GTK_USE_PORTAL=1 export QT_QPA_PLATFORM=wayland - dbus-launch --sh-syntax --exit-with-session sway &> /dev/null - exit + dbus-launch --sh-syntax --exit-with-session sway &> /dev/null; exit fi diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv index 8bc73d5..6f12486 100644 --- a/zsh/.config/zsh/.zshenv +++ b/zsh/.config/zsh/.zshenv @@ -4,15 +4,17 @@ export PATH="$PATH:$HOME/.local/bin" # Essentials export LANG="en_DK.UTF-8" -export EDITOR="nvim" export PAGER="less" +export EDITOR="nano" +(( ${+commands[vim]} )) && export EDITOR="vim" +(( ${+commands[nvim]} )) && export EDITOR="nvim" # Less export LESS="-R" export LESSHISTFILE="/dev/null" # Tmux -[[ -z $TMUX ]] || export TERM="xterm-256color" +[[ -n $TMUX ]] && export TERM="xterm-256color" # Secret variables [[ -f $ZDOTDIR/.env.zsh ]] && source $ZDOTDIR/.env.zsh