Zsh: Improvements

This commit is contained in:
the_4n0nym0u53 2022-01-15 20:28:39 +01:00
parent e51a4bdc22
commit 102f3521f1
No known key found for this signature in database
GPG key ID: 35EE09F5481049BB
3 changed files with 17 additions and 14 deletions

View file

@ -1,11 +1,13 @@
if [[ $(tty) == /dev/tty1 ]] && [[ $(lsb_release -si) == Artix ]]; then
{
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 "^pipewire-pulse$"
pkill "^pipewire$"
}
[[ $(tty) == /dev/tty1 ]] && [[ $(lsb_release -si) == Artix ]] &&
kill_services &> /dev/null
unfunction kill_services

View file

@ -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

View file

@ -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