zsh: Set autologin to tmux

This commit is contained in:
mattr
2025-04-23 18:44:21 -05:00
parent 9ced430e4e
commit d268090392

View File

@@ -126,8 +126,12 @@ alias v='wl-paste'
alias codium='flatpak run com.vscodium.codium'
# Tmux Aliases
alias tclasses='tmux attach -t classes'
###############################################################################
#
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ] && [ -z "$NVIM" ]; then
tmux a -t default || exec tmux new -s default && exit;
fi
###############################################################################
# Custom Functions
@@ -198,24 +202,6 @@ function extract()
fi
}
compins () {
if [[ "$1" == "" ]]; then
echo "Missing file argument"
kill -INT $$
fi
if [[ ! -f "$1" ]]; then
echo "'$1' is not a valid file"
kill -INT $$
fi
case "$1" in
*)
echo "Not implemented or '$1' cannot be inspected via compins"
;;
esac
}
forget () {
print "Forgetting last line with '$@'. Please reload shell after compeletion."