Last active
August 29, 2015 14:15
-
-
Save Avasz/e85b3ebdcef13d3a4f9b to your computer and use it in GitHub Desktop.
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
#Start index from 1 set -g base-index 1 | |
set -g base-index 1 | |
#Unbind ctrl+b and bind it to Alt+a | |
unbind C-b | |
set -g prefix M-a | |
bind M-a send-prefix | |
#Unbind % and bind | for vertical split and - for horizontal split | |
unbind % | |
bind | split-window -h | |
bind - split-window -v | |
#switch windows alt+number, unless we are running irssi | |
bind -n M-1 if 'test `tmux list-panes -F "#W"` != "irssi"' 'select-window -t 1' 'send M-1' | |
bind -n M-2 if 'test `tmux list-panes -F "#W"` != "irssi"' 'select-window -t 2' 'send M-2' | |
bind -n M-3 if 'test `tmux list-panes -F "#W"` != "irssi"' 'select-window -t 3' 'send M-3' | |
bind -n M-4 if 'test `tmux list-panes -F "#W"` != "irssi"' 'select-window -t 4' 'send M-4' | |
bind -n M-5 if 'test `tmux list-panes -F "#W"` != "irssi"' 'select-window -t 5' 'send M-5' | |
bind -n M-6 if 'test `tmux list-panes -F "#W"` != "irssi"' 'select-window -t 6' 'send M-6' | |
bind -n M-7 if 'test `tmux list-panes -F "#W"` != "irssi"' 'select-window -t 7' 'send M-7' | |
bind -n M-8 if 'test `tmux list-panes -F "#W"` != "irssi"' 'select-window -t 8' 'send M-8' | |
bind -n M-9 if 'test `tmux list-panes -F "#W"` != "irssi"' 'select-window -t 9' 'send M-9' | |
bind -n M-0 if 'test `tmux list-panes -F "#W"` != "irssi"' 'select-window -t 0' 'send M-0' | |
#Set window title automatically | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#Alt + vim navigation to switch panes | |
bind -n M-h select-pane -L | |
bind -n M-j select-pane -D | |
bind -n M-k select-pane -U | |
bind -n M-l select-pane -R | |
#Shift + vim navigation to switch windows | |
#bind -n C-j previous-window | |
#bind -n C-k next-window | |
#Ctrl+r to reload tmux-config | |
bind M-r source-file /etc/tmux.conf | |
#Open new window | |
bind-key -n C-n new-window | |
# Set status bar | |
set -g status-bg black | |
set -g status-fg white | |
set -g status-left '#[fg=green]#H' | |
set-window-option -g window-status-current-bg red #hilights current active window | |
#Notify on activity | |
setw -g monitor-activity on | |
set -g visual-activity on | |
set -sg escape-time 0 | |
set -g mode-mouse on #allows to scroll with mouse wheel. Use ctrl+mouse click for selecting stuffs. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment