Skip to content

Instantly share code, notes, and snippets.

@petrbel
Last active August 22, 2016 07:24
Show Gist options
  • Save petrbel/926fac31fa9632af591c257b7e92cd2b to your computer and use it in GitHub Desktop.
Save petrbel/926fac31fa9632af591c257b7e92cd2b to your computer and use it in GitHub Desktop.
TMUX conf
## .tmux.conf
## Petr Belohlavek
## thanks to Ham Vocke and Floop
# Set history
set -g history-limit 99999
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
#unbind-key -t vi-copy MouseDragEndPanel
#set -g mouse-select-window on
#set -g mouse-select-pane on
#set -g mouse-resize-pane on
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# moving between windows
bind-key -n M-p select-window -t:-
bind-key -n M-n select-window -t:+
# highlight active pane and window
set-option -g pane-active-border-fg yellow
set-window-option -g window-status-current-bg yellow
# X window title
set -g set-titles-string 'tmux [#I]:#W'
set -g set-titles on
# status bar tweaks and automatic window renaming
set -g status-left '[#h:#S]'
setw -g automatic-rename on
# log pane to file
unbind l
bind-key l pipe-pane -o "cat >> $HOME/#W-tmux.log" \; display-message "Toggled logging to $HOME/#W-tmux.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment