Add alacritty + fzf + tmux integrations
This commit is contained in:
@@ -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" },
|
||||
|
||||
@@ -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 %
|
||||
@@ -91,3 +93,16 @@ set -g focus-events on
|
||||
|
||||
# Keep current path when creating new windows
|
||||
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"
|
||||
Reference in New Issue
Block a user