Created
August 7, 2013 09:18
-
-
Save fmsf/6172511 to your computer and use it in GitHub Desktop.
TMUX cheats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[10:12:54] Francisco Ferreira: http://robots.thoughtbot.com/post/2641409235/a-tmux-crash-course | |
[10:15:53] Andrzej Grzesik: set -g utf8 on | |
set -g status-utf8 on | |
set -g default-terminal "screen-256color" | |
setw -g automatic-rename | |
setw -g mode-mouse on | |
set -g mouse-select-pane on | |
set -g history-limit 30000 | |
setw -g alternate-screen on | |
# start window numbering at 1 | |
set -g base-index 1 | |
# configure contents of status bar | |
set -g status-justify centre | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# vim style directions for selecting panes | |
bind -r h select-pane -L | |
bind -r j select-pane -D | |
bind -r k select-pane -U | |
bind -r l select-pane -R | |
# and resizing | |
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 | |
# fiddle with colors of inactive windows | |
setw -g window-status-fg white | |
setw -g window-status-bg black | |
setw -g window-status-attr dim | |
# active window colours | |
setw -g window-status-current-fg white | |
setw -g window-status-current-bg default | |
setw -g window-status-current-attr bright | |
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 | |
# reload tmux config | |
unbind r | |
bind r \ | |
source-file ~/.tmux.conf \;\ | |
display 'Reloaded tmux config.' | |
set -g status-left-length 40 | |
set -g status-right-length 50 | |
set -g status-right "#[fg=colour1,bg=colour255,bold] %d %b %R, #(uptime | cut -d, -f 3,4,5,6)" | |
set -g status-left '#[fg=colour1,bg=colour255,bold] ❐ #S #(whoami)@#H ⮀' | |
set -g window-status-format "#[fg=colour239,bg=colour195,bold] #I #W " | |
set -g window-status-current-format "#[fg=colour235,bg=colour252,noreverse,bold] #I #W #[fg=colour39,bg=colour234,nobold]⮀" | |
[10:16:09] Andrzej Grzesik: numbers windows from 1 | |
[10:16:27] Andrzej Grzesik: + brings window into it's own | |
[10:16:51] Andrzej Grzesik: m/M enables/disables mouse (think: for copy paste, needs to be single window, hence the zoom) | |
[10:16:55] Andrzej Grzesik: Cheers :D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment