add yazi, update tmux, zsh
This commit is contained in:
10
dot_zshrc
10
dot_zshrc
@@ -91,12 +91,20 @@ fi
|
||||
# Determin Termanial Type
|
||||
MYTERMINAL=$(basename "/"$(ps -o cmd -f -p $(cat /proc/$(echo $$)/stat | cut -d \ -f 4) | tail -1 | sed 's/ .*$//'))
|
||||
# Attach to TMUX session if not already done and only if we're in xfce4-terminal (but not e.g. PyCharm)
|
||||
if [ -z "$TMUX" ] && [ ${UID} != 0 ] && [[ "$MYTERMINAL" == "xfce4-terminal" ]]
|
||||
if [ -z "$TMUX" ] && [ ${UID} != 0 ] && [[ "$MYTERMINAL" == "xfce4-terminal" ]] || [[ "$MYTERMINAL" == "kitty" ]] || [[ "$MYTERMINAL" == "ghostty" ]] || [[ "$MYTERMINAL" == "sh" ]]
|
||||
then
|
||||
#tmux new-session -A -s main
|
||||
tmux attach || tmux new
|
||||
fi
|
||||
|
||||
function y() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
|
||||
yazi "$@" --cwd-file="$tmp"
|
||||
IFS= read -r -d '' cwd < "$tmp"
|
||||
[ -n "$cwd" ] && [ "$cwd" != "$PWD" ] && builtin cd -- "$cwd"
|
||||
rm -f -- "$tmp"
|
||||
}
|
||||
|
||||
|
||||
#### for pip3 --user installed applications
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
|
||||
Reference in New Issue
Block a user