|
# General |
|
# ------------------------------------------------------------------------------ |
|
|
|
# Increase default history scrollback (default is 2000) |
|
set-option -g history-limit 5000 |
|
|
|
# Native Integration |
|
# ------------------------------------------------------------------------------ |
|
|
|
# Ensure colors are up to snuff |
|
set -g default-terminal 'screen-256color' |
|
|
|
# Native mouse window manipulation |
|
set -g mouse on |
|
|
|
# Actually scroll the window when the mouse is scrolled |
|
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" |
|
bind -n WheelDownPane select-pane -t= \; send-keys -M |
|
|
|
# Vi keybindings for leader-key movement |
|
set -g status-keys vi |
|
set-window-option -g mode-keys vi |
|
setw -g mode-keys vi |
|
|
|
# Allow hex codes to be sent from iTerm2 |
|
set -g assume-paste-time 0 |
|
|
|
# Send focus events (useful for Vim plugins) |
|
set -g focus-events on |
|
|
|
# Allow special cursor change codes through |
|
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q' |
|
|
|
# Faster escape time for CLIs |
|
set -sg escape-time 10 |
|
|
|
# Status Line |
|
# ------------------------------------------------------------------------------ |
|
|
|
# Make the base index 1 |
|
set-option -g base-index 1 |
|
|
|
# Make the pane base index be 1 as well |
|
setw -g pane-base-index 1 |
|
|
|
# Put status bar on top |
|
set-option -g status-position top |
|
|
|
# Key Bindings |
|
# ------------------------------------------------------------------------------ |
|
|
|
# Force a reload of the config file |
|
unbind r |
|
bind r source-file ~/.tmux.conf |
|
|
|
# Window splitting |
|
unbind % |
|
unbind V |
|
unbind H |
|
unbind k |
|
bind V split-window -h -c "#{pane_current_path}" |
|
bind H split-window -v -c "#{pane_current_path}" |
|
bind k kill-pane -a |
|
|
|
# Pane manipulation shouldn't repeat |
|
bind-key Up select-pane -U |
|
bind-key Down select-pane -D |
|
bind-key Left select-pane -L |
|
bind-key Right select-pane -R |
|
|
|
# New tabs should start in current directory |
|
bind c new-window -c "#{pane_current_path}" |
|
|
|
|
|
# Colors |
|
# ------------------------------------------------------------------------------ |
|
|
|
# Set status bar |
|
set -g status-bg colour235 |
|
set -g status-fg colour246 |
|
set-window-option -g window-status-current-fg colour254 |
|
set-window-option -g window-status-current-bg colour234 |
|
|
|
# Set tab format |
|
setw -g window-status-format " #I:#W " |
|
setw -g window-status-current-format " #I:#W " |
|
|
|
# Remove session info |
|
set -g status-left '' |
|
|
|
# Window |
|
set -g window-style 'fg=colour247,bg=colour233' |
|
set -g window-active-style 'fg=colour247,bg=colour234' |
|
|
|
# Pane border |
|
set-option -g pane-border-bg colour235 |
|
set-option -g pane-border-fg colour235 |
|
set-option -g pane-active-border-bg colour235 |
|
set-option -g pane-active-border-fg colour235 |
|
|
|
# Set color when status bar needs input |
|
set-option -g message-bg colour232 |
|
set-option -g message-fg colour254 |
|
|
|
# Source OS-specific conf files |
|
# ------------------------------------------------------------------------------ |
|
if-shell "uname | grep -q Darwin" "source ~/dotfiles/tmux-macos.conf" "source ~/dotfiles/tmux-linux.conf" |
|
|
Hi, how exactly do you map the command key to work like that? I'd like to map
command + hjkl
to pane navigation but I don't see how you set it up on this config. That or I don't understand how you did it.Is it this command?
set-option -g default-command 'reattach-to-user-namespace -l zsh'