From c6e2200775d7ee8e8e57137dfc9429d783df3b6c Mon Sep 17 00:00:00 2001 From: sebastian Date: Sat, 25 Oct 2025 16:13:30 +0200 Subject: [PATCH] add yazi, update tmux, zsh --- dot_config/tmux/tmux.conf | 17 +++++++++++++++++ dot_config/yazi/package.toml | 7 +++++++ dot_config/yazi/theme.toml | 2 ++ dot_zshrc | 10 +++++++++- 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 dot_config/yazi/package.toml create mode 100644 dot_config/yazi/theme.toml diff --git a/dot_config/tmux/tmux.conf b/dot_config/tmux/tmux.conf index 5243ab0..54e2fb0 100644 --- a/dot_config/tmux/tmux.conf +++ b/dot_config/tmux/tmux.conf @@ -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' diff --git a/dot_config/yazi/package.toml b/dot_config/yazi/package.toml new file mode 100644 index 0000000..f391da0 --- /dev/null +++ b/dot_config/yazi/package.toml @@ -0,0 +1,7 @@ +[plugin] +deps = [] + +[[flavor.deps]] +use = "Chromium-3-Oxide/everforest-medium" +rev = "0158f0f" +hash = "dbbbfe681e156c28303efb1f44b6cbc4" diff --git a/dot_config/yazi/theme.toml b/dot_config/yazi/theme.toml new file mode 100644 index 0000000..4809638 --- /dev/null +++ b/dot_config/yazi/theme.toml @@ -0,0 +1,2 @@ +[flavor] +dark = "everforest-medium" diff --git a/dot_zshrc b/dot_zshrc index ac6a721..7869c47 100644 --- a/dot_zshrc +++ b/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