Add sesh and dependency to zoxide

This commit is contained in:
Yax 2026-01-08 14:26:58 +01:00
parent d9ea276f5a
commit 207f3c5dfe
2 changed files with 26 additions and 9 deletions

View file

@ -65,6 +65,9 @@ bind-key a send-prefix
setw -g monitor-activity on
set -g visual-activity on
# don't exit from tmux when closing a session
set -g detach-on-destroy off
# Split windows into panes: CTRL-A + h or v
bind-key h split-window -v -c '#{pane_current_path}'
bind-key v split-window -h -c '#{pane_current_path}'
@ -110,15 +113,26 @@ bind-key M-4 send-keys "$FAVORITE_COMMAND4"
# disposable terminal
bind-key + display-popup -E -w 80% -h 80% "tmux kill-session -t popup 2>/dev/null || true; tmux new-session -d -s popup -c '#{pane_current_path}' \\; set-option -t popup detach-on-destroy on \\; attach -t popup"
# sesh
bind-key "s" run-shell "sesh connect \"$(
sesh list --icons | fzf-tmux -p 80%,70% \
--no-sort --ansi --border-label ' sesh ' --prompt '⚡ ' \
--header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
--bind 'tab:down,btab:up' \
--bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --icons)' \
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --icons)' \
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)' \
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)' \
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
--bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list --icons)' \
--preview-window 'right:55%' \
--preview 'sesh preview {}'
)\""
# Reload tmux config
unbind r
bind r source-file ~/.tmux.conf \; display-message "tmux config reloaded!"
# plugin zap
set -g @zap_key 's' # default: 'z'
set -g @zap_width '50%' # default: '60%'
set -g @zap_height '40%' # default: '60%'
# plugin powerkit
set -g @powerkit_theme 'nord'
set -g @powerkit_theme_variant 'dark'
@ -132,10 +146,7 @@ set -g @powerkit_plugin_memory_cache_ttl '20'
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'fabioluciano/tmux-powerkit'
set -g @plugin 'AleckAstan/tmux-zap'
set -g @plugin 'azorng/tmux-smooth-scroll'
# run tpm

View file

@ -148,7 +148,7 @@ export ZSH_TMUX_DEFAULT_SESSION_NAME=build
if command -v fzf &>/dev/null; then
change_path_and_find_project() {
cd {{ .projectdir }}
z {{ .projectdir }}
zle fzf-cd-widget
zle reset-prompt
}
@ -158,6 +158,12 @@ if command -v fzf &>/dev/null; then
fi
# ---------------------------------------------------------------------------
# Zoxide
# ---------------------------------------------------------------------------
eval "$(zoxide init zsh)"
# ---------------------------------------------------------------------------
# Sdkman
# ---------------------------------------------------------------------------