Skip to content

Instantly share code, notes, and snippets.

@snatchev
Created July 16, 2020 14:11
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 snatchev/938dfebd5f9c404a1cedebe0f8dc4c5c to your computer and use it in GitHub Desktop.
Save snatchev/938dfebd5f9c404a1cedebe0f8dc4c5c to your computer and use it in GitHub Desktop.
Simple practical tmux conf
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
set-option -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
set-option -g mouse on
set-option -g status-position top
set-option -sg escape-time 0
set-option -g history-limit 10000
# start with index 1, not 0
set-option -g base-index 1
set-window-option -g pane-base-index 1
# some mac-link binds
# bind to the meta key, which then can be fix by the term
bind-key -n M-t new-window
bind-key -n M-\{ previous-window
bind-key -n M-\} next-window
# Mouse3 marks the window, which is less than useful
bind-key -n MouseDown3Pane paste-buffer
bind-key t run-shell "tmux show-buffer | xargs -I {} date -d @{}"
# Control-K clears the scrollback buffer
bind -n C-k clear-history
run-shell "/usr/local/google/home/snatchev/.local/bin/powerline-config tmux setup"
set-option -g status-bg colour235
set-option -g status-right "#(~/bin/prodcertstatus-tmux) #(~/.local/bin/powerline tmux right)"
set-option -g status-interval 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment