Skip to content

Instantly share code, notes, and snippets.

@SrivastavaKshitij
Created November 16, 2018 19:36
Show Gist options
  • Save SrivastavaKshitij/d139d6c0da404de949a1f43aaf6b794c to your computer and use it in GitHub Desktop.
Save SrivastavaKshitij/d139d6c0da404de949a1f43aaf6b794c to your computer and use it in GitHub Desktop.
tmux configuration file
# Use C-o like we do in screen as action key
#unbind C-b
set -g prefix C-a
#bind-key C-b last-window
bind-key a send-prefix
bind-key C-n next-window
bind-key C-p previous-window
# Terminal emulator window title
set -g set-titles on
set -g set-titles-string '#S:#I.#P #W'
# Copy mode
unbind [
bind Escape copy-mode
# Use Vi mode
setw -g mode-keys vi
# Show and hide the status bar
bind-key f set-option status
# Make splits easier to use
bind | split-window -h
bind _ split-window -v
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=black,bright]#H'
set -g status-right '#[fg=yellow,bright]#S #[fg=green,dim]%H:%M'
set-window-option -g window-status-current-fg red
# align center the window list
set -g status-justify centre
set -g default-terminal "screen-256color"
set -g history-limit 10000
# Automatically set window title
setw -g automatic-rename on
# number windows starting with 1 instead of 0
set -g base-index 1
# Only resize the window we're looking at
set -g aggressive-resize on
# Let us type commands fast
set -s escape-time 0
# Handy keybindings to join other windows as panes in the current window
# remember you can always use cmd+! to break a pane off to a new window
bind-key J command-prompt -p "join pane from:" "join-pane -s '%%'"
# Press cmd+~ to show a quake-style htop
bind '~' split-window "exec htop"
# open new windows in same directory as current window
bind c new-window -c "#{pane_current_path}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment