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

@@ -5,6 +5,7 @@ decorations = "Full"
opacity = 0.98 opacity = 0.98
startup_mode = "Windowed" startup_mode = "Windowed"
dimensions = { columns = 140, lines = 45 } dimensions = { columns = 140, lines = 45 }
option_as_alt = "Both"
[font] [font]
size = 16.0 size = 16.0
@@ -57,7 +58,7 @@ bindings = [
{ key = "K", mods = "Alt", chars = "\u001bk" }, { key = "K", mods = "Alt", chars = "\u001bk" },
{ key = "L", mods = "Alt", chars = "\u001bl" }, { key = "L", mods = "Alt", chars = "\u001bl" },
{ key = "M", mods = "Alt", chars = "\u001bm" }, { key = "M", mods = "Alt", chars = "\u001bm" },
{ key = "N", mods = "Alt", chars = "\u001bn" }, # { key = "N", mods = "Alt", chars = "\u001bn" }, # Commented out to allow Option-N for tilde on macOS
{ key = "O", mods = "Alt", chars = "\u001bo" }, { key = "O", mods = "Alt", chars = "\u001bo" },
{ key = "P", mods = "Alt", chars = "\u001bp" }, { key = "P", mods = "Alt", chars = "\u001bp" },
{ key = "Q", mods = "Alt", chars = "\u001bq" }, { key = "Q", mods = "Alt", chars = "\u001bq" },

View File

@@ -23,8 +23,10 @@ set -ga terminal-overrides ",*256col*:Tc"
# Faster key repetition # Faster key repetition
set -s escape-time 0 set -s escape-time 0
# Split panes using | and - # Split panes using v and b (or \ and -)
bind | split-window -h -c "#{pane_current_path}" 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}" bind - split-window -v -c "#{pane_current_path}"
unbind '"' unbind '"'
unbind % unbind %
@@ -90,4 +92,17 @@ set-option -g set-titles on
set -g focus-events on set -g focus-events on
# Keep current path when creating new windows # 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"