Files
get/conf/tmux.conf
2026-07-23 08:55:57 +02:00

100 lines
2.4 KiB
Bash
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# tmux config — screen-like key bindings
# ============================================
# Searched in this oreder
# /etc/tmux.conf
# ~/.config/tmux/tmux.conf
# ~/.tmux.conf
# Extended keys (required for pi Shift+Enter etc.)
set -g extended-keys on
set -g extended-keys-format csi-u
# Prefix: Ctrl+a (like screen)
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Reload config
bind R source-file ~/.tmux.conf \; display "Config reloaded!"
# Windows
bind c new-window -c "#{pane_current_path}"
bind d detach-client
bind n next-window
bind p previous-window
bind Space next-window
bind BSpace previous-window
bind 0 select-window -t :=0
bind 1 select-window -t :=1
bind 2 select-window -t :=2
bind 3 select-window -t :=3
bind 4 select-window -t :=4
bind 5 select-window -t :=5
bind 6 select-window -t :=6
bind 7 select-window -t :=7
bind 8 select-window -t :=8
bind 9 select-window -t :=9
# Switch to last window (double C-a like screen)
bind C-a last-window
# Rename window (like screen A)
bind A command-prompt -I "#W" "rename-window '%%'"
# Panes (splits) — screen style
bind - split-window -v -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
# Pane navigation / rotation
bind Tab select-pane -t :.+
bind o select-pane -t :.+
bind C-o rotate-window
# Kill / remove
bind k confirm-before -p "kill-window #W? (y/n)" kill-window
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
bind X confirm-before -p "kill-server? (y/n)" kill-server
# Copy / paste / scroll
bind [ copy-mode
bind ] paste-buffer
bind Escape copy-mode
# Misc screen-like bindings
bind r refresh-client
bind t clock-mode
bind ? list-keys
bind : command-prompt
bind . command-prompt "move-window -t '%%'"
bind w choose-window
bind s choose-session
# Pane resizing (screen-ish arrows)
bind -r C-Left resize-pane -L 2
bind -r C-Right resize-pane -R 2
bind -r C-Up resize-pane -U 2
bind -r C-Down resize-pane -D 2
# ============================================
# Appearance (optional but handy)
# ============================================
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g history-limit 10000
setw -g aggressive-resize on
# Enable mouse support (clickable panes, scroll)
set -g mouse on
# Status bar tweaks
set -g status-interval 5
#set -g status-left "#H [#S] "
set -g status-left "#H/#S "
set -g status-right " %H:%M %d-%b-%y"
# Claude Code support
set -g allow-passthrough on
set -as terminal-features 'xterm*:extkeys'