From 30ad84715ed247b823bd142a4f504b250b374df4 Mon Sep 17 00:00:00 2001 From: Jens Luedicke Date: Sun, 21 Sep 2025 10:13:20 +0200 Subject: [PATCH] Add alacritty + fzf + tmux integrations --- alacritty/alacritty.toml | 3 ++- tmux/tmux.conf | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/alacritty/alacritty.toml b/alacritty/alacritty.toml index f8c163f..4931f1a 100644 --- a/alacritty/alacritty.toml +++ b/alacritty/alacritty.toml @@ -5,6 +5,7 @@ decorations = "Full" opacity = 0.98 startup_mode = "Windowed" dimensions = { columns = 140, lines = 45 } +option_as_alt = "Both" [font] size = 16.0 @@ -57,7 +58,7 @@ bindings = [ { key = "K", mods = "Alt", chars = "\u001bk" }, { key = "L", mods = "Alt", chars = "\u001bl" }, { 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 = "P", mods = "Alt", chars = "\u001bp" }, { key = "Q", mods = "Alt", chars = "\u001bq" }, diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 5f93332..b5dc2db 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -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}" \ No newline at end of file +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" \ No newline at end of file