Skip to content

Instantly share code, notes, and snippets.

@codeslinger
Created February 27, 2024 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeslinger/f88e3bad71b9f9a30265b9af55af3a79 to your computer and use it in GitHub Desktop.
Save codeslinger/f88e3bad71b9f9a30265b9af55af3a79 to your computer and use it in GitHub Desktop.
tmux configuration
# Tmux settings
unbind-key C-b
set-option -g prefix C-l
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Set XTerm key bindings
setw -g xterm-keys on
# Set colors
set -g default-terminal "screen-256color"
# Set reload key to r
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# Count sessions start at 0
set -g base-index 0
# Use vi bindings
setw -g mode-keys vi
set -s escape-time 0
# Remap window navigation to vim
unbind-key j
bind-key j select-pane -D
unbind-key k
bind-key k select-pane -U
unbind-key h
bind-key h select-pane -L
unbind-key l
bind-key l select-pane -R
# Set the title bar
set -g set-titles on
set -g set-titles-string '#(whoami) :: #h'
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-interval 5
set -g status-left-length 90
set -g status-right-length 60
set -g status-left "#[fg=Green]#(whoami)#[fg=white]::#[fg=blue]#(hostname -s)#[fg=white]"
set -g status-justify left
set -g status-right '#[fg=Cyan]#S #[fg=white]%a %d %b %R'
# make it more like screen(1)
unbind-key Space
bind-key Space next-window
unbind-key C-Space
bind-key C-Space next-window
unbind-key C-p
bind-key C-p previous-window
unbind-key Escape
bind-key Escape copy-mode
bind-key C-l last-window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment