Files
dotfiles/dot_config/herdr/kitty.conf
T

135 lines
6.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Font Configuration
font_size 11
font_family VictorMono Nerd Font
bold_italic_font auto
shell_integration enabled
# Control
allow_remote_control yes
listen_on unix:@mykitty
# Shell — every kitty OS window attaches to the shared tmux session
shell tmux new-session -A -s main
# Window Configuration
window_padding_width 12
background_opacity 0.9
hide_window_decorations yes
# Layouts now handled by tmux; keep fat available for any non-tmux use
enabled_layouts fat:bias=75;full_size=1;mirrored=false
# Cursor Configuration
cursor_blink_interval 1
# Scrollback (tmux owns scrollback in-session; this covers anything outside it)
scrollback_lines 3000
# Terminal features
copy_on_select auto
strip_trailing_spaces smart
# ── Key bindings → forwarded to tmux (prefix C-b = \x02) ────────────────
# send_text triggers the exact bind-keys in tmux.conf, in-session.
# Panes (kitty "windows" → tmux panes)
map super+w send_text all \x02x
map super+t send_text all \x02%
map super+n send_text all \x02"
# Clipboard (kitty-native)
map super+c copy_to_clipboard
map super+v paste_from_clipboard
map ctrl+v paste_from_clipboard
# Tabs (kitty "tabs" → tmux windows; your bind-key t/H/L)
map alt+h send_text all \x02H
map alt+l send_text all \x02L
map super+enter send_text all \x02t
# Pane navigation: pass ctrl+hjkl through to tmux/nvim
# (pass_keys.py kitten removed — vim-tmux-navigator replaces it)
# Pane resizing (prefix + ctrl+arrow = tmux default resize)
map super+left send_text all \x02\x1b[1;5D
map super+right send_text all \x02\x1b[1;5C
map super+up send_text all \x02\x1b[1;5A
map super+down send_text all \x02\x1b[1;5B
# Direct window jumps (tmux prefix+N)
map alt+q send_text all \x021
map alt+w send_text all \x022
map alt+e send_text all \x023
map alt+r send_text all \x024
map alt+t send_text all \x025
map alt+y send_text all \x026
map alt+u send_text all \x027
map alt+i send_text all \x028
map alt+o send_text all \x029
# Session controls
map super+d send_text all \x02d
map super+s send_text all \x02s
map super+z send_text all \x02z
# ── Tab bar: hidden — tmux-dotbar owns the status UI ────────────────────
tab_bar_style hidden
# BEGIN_KITTY_THEME
# cyberdream (current-theme.conf → themes/cyberdream.conf)
include current-theme.conf
# END_KITTY_THEME
#
active_opacity 0.9
# ── Plugins ──────────────────────────────────────────────────────────────
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'vaaleyard/tmux-dotbar'
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name'
set -g @plugin 'omerxx/tmux-sessionx'
# ── Kitty compatibility ──────────────────────────────────────────────────
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",xterm-kitty:Tc"
set -as terminal-features ",xterm-kitty:RGB:usstyle:hyperlinks:clipboard:extkeys"
set -s extended-keys on # kitty keyboard protocol → nvim
# Kitty graphics protocol passthrough (yazi / image preview)
set -g allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
# ── Clipboard (Wayland / Niri) ───────────────────────────────────────────
set -g set-clipboard on # OSC 52 — covers ssh'd sessions
set -g mouse on
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "wl-copy"
bind -T copy-mode-vi Y send -X copy-pipe-and-cancel "wl-copy" \; send -X cancel
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "wl-copy"
# ── Titles → Niri active window ──────────────────────────────────────────
set -g set-titles on
set -g set-titles-string "#S › #{pane_current_command} · #{b:pane_current_path}"
setw -g automatic-rename on
set -g automatic-rename-format "#{window_icon} #{b:pane_current_path}"
# ── QoL ──────────────────────────────────────────────────────────────────
set -g history-limit 50000
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
# ── Keybinds ─────────────────────────────────────────────────────────────
bind-key t new-window -c "#{pane_current_path}"
bind-key [ previous-window
bind-key ] next-window
bind-key H previous-window
bind-key L next-window
# Splits inherit cwd (kitty super+t / super+n land here)
# vsplit: new pane right at 35% width · hsplit: new pane below at 25% height
bind % split-window -h -l 30% -c "#{pane_current_path}"
bind '"' split-window -v -l 25% -c "#{pane_current_path}"
# Copy-mode entry (default prefix+[ is rebound above)
bind Escape copy-mode
# ── Pane navigation: ctrl+hjkl, no prefix ────────────────────────────────
# Vim-aware: if the pane runs (n)vim, forward the key so vim handles its
# own window movement (pair with vim-tmux-navigator in AstroNvim).
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
bind -n C-h if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind -n C-j if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind -n C-k if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind -n C-l if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
# Same nav from inside copy-mode
bind -T copy-mode-vi C-h select-pane -L
bind -T copy-mode-vi C-j select-pane -D
bind -T copy-mode-vi C-k select-pane -U
bind -T copy-mode-vi C-l select-pane -R
# Clear-screen escape hatch (C-l is consumed above)
bind C-l send-keys C-l
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
Lets synchronize the Mod+H and Mod+L from niri to work with the tmux window bindings for optimized key productivity