Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
setenv SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
# Make it use C-a, similar to screen..
#unbind C-b
#unbind l
#set -g prefix C-a
#bind-key C-a last-window
#unbind C-b
#set -g prefix C-g
#bind g send-prefix
#bind C-g send-prefix
#bind-key C-g last-window
# Make it use C-a, similar to screen.
unbind C-b
set -g prefix C-a
bind a send-prefix
bind C-a send-prefix
# Tap twice to go to last window
bind-key C-a last-window
# Reload key
bind r source-file ~/.tmux.conf
unbind ^A
bind ^A select-pane -t :.+
# THEME
set -g status-interval 2
set -g status-bg black
set -g status-fg white
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=green]#(whoami)@#H#[default]'
#set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=blue]%H:%M#[default]'
set -g status-right "#S #[fg=green,bg=black,bright]#(tmux-mem-cpu-load 2)#[default]"
# USE VIM BINDINGS
set-window-option -g mode-keys vi
# Open Python interpreter in vertical pane
bind-key C-m split-window -h 'python'
#### http://superuser.com/questions/210125/scroll-shell-output-with-mouse-in-tmux
#
# Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right
set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
# Make mouse useful in copy mode
setw -g mode-mouse on
# Allow mouse to select which pane to use
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
# Scroll History
set -g history-limit 30000
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
set -s escape-time 50
### END superuser.com snippet
# Toggle mouse on with ^B m
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
# Toggle mouse off with ^B M
bind M \
set -g mode-mouse off \;\
set -g mouse-resize-pane off \;\
set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\
display 'Mouse: OFF'
unbind +
bind + \
new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
swap-pane -s tmux-zoom.0 \;\
select-window -t tmux-zoom
unbind -
bind - \
last-window \;\
swap-pane -s tmux-zoom.0 \;\
kill-window -t tmux-zoom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.