Skip to content

Instantly share code, notes, and snippets.

@mudphone
Created March 27, 2020 03:36
Show Gist options
  • Save mudphone/0c3ca610e1cdb626af95291c65682dc4 to your computer and use it in GitHub Desktop.
Save mudphone/0c3ca610e1cdb626af95291c65682dc4 to your computer and use it in GitHub Desktop.
# Our .tmux.conf file
# Setting the prefix from C-b to C-a
# START:prefix
#set -g prefix C-]
set -g prefix 'C-\'
# '<--Need this quote for emacs syntax highlight bug
# END:prefix
# Free the original Ctrl-b prefix keybinding
# START:unbind
unbind C-b
# END:unbind
#setting the delay between prefix and command
# START:delay
set -s escape-time 1
# END:delay
# Ensure that we can send Ctrl-A to other apps
# START:bind_prefix
#unbind C-a
#bind C-a send-prefix
# END:bind_prefix
# Set the base index for windows to 1 instead of 0
# START:index
set -g base-index 1
# END:index
# Set the base index for panes to 1 instead of 0
# START:panes_index
setw -g pane-base-index 1
# END:panes_index
# Reload the file with Prefix r
# START:reload
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# END:reload
# splitting panes
# START:panesplit
bind | split-window -h
bind - split-window -v
# END:panesplit
# moving between panes
# START:paneselect
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# END:paneselect
# Quick pane selection
# START:panetoggle
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# END:panetoggle
# Pane resizing
# START:paneresize
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# END:paneresize
# mouse support - set to on if you want to use the mouse
# START:mouse
set -g mouse on
# END:mouse
# Set the default terminal mode to 256color mode
# START:termcolor
#set -g default-terminal "screen-256color"
set -g default-terminal "xterm-256color"
# END:termcolor
# enable activity alerts
#START:activity
setw -g monitor-activity on
set -g visual-activity on
#END:activity
# set the status line's colors
# START:statuscolor
set -g status-fg white
set -g status-bg black
# END:statuscolor
# set the color of the window list
# START:windowstatuscolor
setw -g window-status-style fg=cyan,bg=default,dim
# END:windowstatuscolor
# set colors for the active window
# START:activewindowstatuscolor
setw -g window-status-current-style fg=white,bg=red,bright
# END:activewindowstatuscolor
# pane colors
# START:panecolors
set -g pane-border-style fg=green,bg=black
set -g pane-active-border-style fg=white,bg=yellow
# END:panecolors
# Command / message line
# START:cmdlinecolors
set -g message-style fg=white,bg=black,bright
# END:cmdlinecolors
# Status line left side
# START:statusleft
set -g status-left-style bg=black
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
# END:statusleft
# Status line right side
# 15% | 28 Nov 18:15
# START: statusright
set -g status-right "#[fg=cyan]%d %b %R"
# END:statusright
# Update the status bar every sixty seconds
# START:updateinterval
set -g status-interval 60
# END:updateinterval
# Center the window list
# START:centerwindowlist
set -g status-justify centre
# END:centerwindowlist
# enable vi keys.
# START:vikeys
setw -g mode-keys emacs
# END:vikeys
# Customized:
# copy to clipboard in emacs
unbind -T copy-mode M-w
bind -T copy-mode M-w send -X copy-pipe "reattach-to-user-namespace pbcopy" \; display-message
# See additional config in osx-prt.el, to get this copied to clipboard in OS X.
# rotate through panes
#unbind ^A
#bind ^A select-pane -t :.+
# flow shifted keys to emacs
set-window-option -g xterm-keys on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment