This commit is contained in:
Hadi
2024-10-04 10:58:53 +02:00
parent 7047ffe785
commit 8f6b049129
9 changed files with 91 additions and 89 deletions

View File

@@ -12,53 +12,20 @@
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
set -gq allow-passthrough on
bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt
set -g detach-on-destroy off # don't exit from tmux when closing a session
bind-key -n C-Tab select-window -n
bind-key -n C-Tab next-window
bind-key -n C-S-Tab previous-window
bind-key "t" run-shell "sesh connect \"$(
sesh list -t | fzf-tmux -p 65%,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)' \
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t)' \
--bind 'ctrl-g:change-prompt( )+reload(sesh list -c)' \
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z)' \
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
--bind 'ctrl-d:execute(tmux kill-session -t {})+change-prompt( )+reload(sesh list)'
)\""
bind-key -n M-Tab new-window
'';
plugins = with pkgs; [
tmuxPlugins.vim-tmux-navigator
{
plugin = tmuxPlugins.catppuccin;
extraConfig = ''
set-option -g status-position top
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_status_modules_right ""
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{pane_current_path}"
set -g @catppuccin_status_background "default"
set-option -g default-terminal "screen-256color"
'';
}
tmuxPlugins.resurrect
tmuxPlugins.nord
];
};
}

View File

@@ -21,12 +21,23 @@
"echo; ${pkgs.pfetch}/bin/pfetch"
else
""}
function sesh-sessions() {
session=$(sesh list -t -c | fzf --height 70% --reverse)
[[ -z "$session" ]] && return
sesh connect $session
}
zle -N sesh-sessions
bindkey -M emacs '\es' sesh-sessions
bindkey -M vicmd '\es' sesh-sessions
bindkey -M viins '\es' sesh-sessions
'';
history = {
ignoreDups = true;
save = 1000000;
size = 1000000;
save = 10000;
size = 10000;
};
profileExtra = lib.optionalString (config.home.sessionPath != [ ]) ''