Add alacritty + fzf + tmux integrations

This commit is contained in:
2025-09-21 10:13:20 +02:00
parent 9dbf06d4ad
commit 30ad84715e
2 changed files with 20 additions and 4 deletions

View File

@@ -23,8 +23,10 @@ set -ga terminal-overrides ",*256col*:Tc"
# Faster key repetition
set -s escape-time 0
# Split panes using | and -
bind | split-window -h -c "#{pane_current_path}"
# Split panes using v and b (or \ and -)
bind v split-window -h -c "#{pane_current_path}"
bind b split-window -v -c "#{pane_current_path}"
bind '\' split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
@@ -90,4 +92,17 @@ set-option -g set-titles on
set -g focus-events on
# Keep current path when creating new windows
bind c new-window -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# FZF integration
# Session switcher
bind s display-popup -E "tmux list-sessions -F '#{session_name}' | fzf --preview 'tmux list-windows -t {} | column -t' --preview-window=down:20% | xargs tmux switch-client -t"
# Window switcher
bind w display-popup -E "tmux list-windows -F '#{window_index}: #{window_name}' | fzf --preview 'tmux list-panes -t {1} -F \"#{pane_index}: #{pane_current_command}\"' | cut -d: -f1 | xargs tmux select-window -t"
# Quick file search and open in new window
bind f display-popup -E "fd --type f --hidden --follow --exclude .git | fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}' | xargs -I {} tmux new-window 'vim {}'"
# Quick directory navigation
bind g display-popup -E "fd --type d --hidden --follow --exclude .git | fzf --preview 'tree -C {} | head -200' | xargs -I {} tmux send-keys 'cd {}' Enter"