Created
January 18, 2016 17:02
-
-
Save jancuk/fd77ad73c220d3d2f5ea to your computer and use it in GitHub Desktop.
tmux conf
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
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
bind-key -r C-h select-window -t :- | |
bind-key -r C-l select-window -t :+ | |
unbind C-b | |
set -g prefix ` | |
bind-key ` send-prefix | |
bind-key -n F11 set -g prefix C-o | |
bind-key -n F12 set -g prefix ` | |
set -sg escape-time 0 | |
bind C-l send-keys 'C-l' | |
set -g mode-mouse on | |
set -g mode-keys vi | |
bind-key -t vi-copy v begin-selection | |
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
unbind -t vi-copy Enter | |
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" | |
set -g mouse-select-window on | |
set -g mouse-select-pane on | |
set -g mouse-resize-pane on | |
set -g xterm-keys on | |
set-window-option -g xterm-keys on | |
# set-option -g mouse-utf8 off | |
set-option -g default-terminal screen-256color | |
# More straight forward key bindings for splitting | |
bind-key | split-window -h | |
bind-key - split-window -v | |
# Smart pane switching with awareness of vim splits | |
#bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-h) || tmux select-pane -L" | |
#bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-j) || tmux select-pane -D" | |
#bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-k) || tmux select-pane -U" | |
#bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-l) || tmux select-pane -R" | |
#bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys 'C-\\') || tmux select-pane -l" | |
bind C-l send-keys 'C-l' | |
bind-key C-o rotate-window | |
set-window-option -g other-pane-height 25 | |
set-window-option -g other-pane-width 80 | |
bind-key C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" | |
bind-key C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" | |
set-option -g display-panes-time 1500 | |
#set-option -g default-command "reattach-to-user-namespace -l zsh" | |
set-option -g default-command "/bin/bash -c 'which reattach-to-user-namespace >/dev/null && exec reattach-to-user-namespace $SHELL -l || exec $SHELL -l'" | |
set-option -g lock-server on | |
set-option -g lock-command 'vlock' | |
set-option -g lock-after-time 1800 | |
bind-key C-x lock-server | |
# History | |
set -g history-limit 100000 | |
# Terminal emulator window title | |
set -g set-titles on | |
set -g set-titles-string '#S:#I.#P #W' | |
# Status Bar 1.8 format | |
# set-option -g status-bg black | |
# set-option -g status-fg cyan | |
# Status Bar 1.9 format | |
set-option -g status-style "bg=black" | |
set-option -g status-style "fg=cyan" | |
# Notifying if other windows has activities | |
set -g monitor-activity off | |
set -g visual-activity on | |
# Highlighting the active window in status bar (1.8) | |
setw -g window-status-current-bg blue | |
setw -g window-status-current-fg white | |
# Highlighting the active window in status bar (1.9 | |
setw -g window-status-current-style "bg=blue" | |
setw -g window-status-current-style "fg=white" | |
# Highlight active window on screen | |
set-option -g pane-active-border-fg colour32 # light blue | |
# Clock | |
setw -g clock-mode-colour green | |
setw -g clock-mode-style 24 | |
setw -g aggressive-resize on | |
set -g base-index 1 | |
bind-key S command-prompt -p ssh: "new-window -n %1 'ssh %1'" | |
set -g update-environment -r | |
# No delay for escape key press | |
set -sg escape-time 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment