add yazi, update tmux, zsh
This commit is contained in:
@@ -5,6 +5,15 @@ set -ga terminal-overrides ",xterm-256color:Tc"
|
||||
# enable Mouse Mode
|
||||
set -g mouse off
|
||||
|
||||
# Enable UTF-8
|
||||
#set -g utf8 on
|
||||
#set -g status-utf8 on
|
||||
|
||||
# Use true color (for Kitty + themes)
|
||||
#set -g default-terminal "tmux-256color"
|
||||
#set -as terminal-overrides ',xterm-256color:RGB'
|
||||
|
||||
|
||||
|
||||
# start window numbers at 1 to match keyboard order with tmux window order
|
||||
set -g base-index 1
|
||||
@@ -88,5 +97,13 @@ set-option -g @plugin "roy2220/easyjump.tmux"
|
||||
#set -g @plugin "nordtheme/tmux"
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
|
||||
|
||||
# For Yazi image preview to work
|
||||
set -g allow-passthrough on
|
||||
set -ga update-environment TERM
|
||||
set -ga update-environment TERM_PROGRAM
|
||||
|
||||
|
||||
|
||||
run '~/.config/tmux/plugins/tpm/tpm'
|
||||
|
||||
|
||||
7
dot_config/yazi/package.toml
Normal file
7
dot_config/yazi/package.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
[plugin]
|
||||
deps = []
|
||||
|
||||
[[flavor.deps]]
|
||||
use = "Chromium-3-Oxide/everforest-medium"
|
||||
rev = "0158f0f"
|
||||
hash = "dbbbfe681e156c28303efb1f44b6cbc4"
|
||||
2
dot_config/yazi/theme.toml
Normal file
2
dot_config/yazi/theme.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
[flavor]
|
||||
dark = "everforest-medium"
|
||||
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