-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
103 lines (80 loc) · 2.44 KB
/
tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# TMUX configuration file
#########################
# Change prefix key to Ctrl+A like screen
# (WARNING: Block the original binding to go to the begin of the line)
#unbind C-b
#set -g prefix C-a
# Last active window
unbind l
bind C-a last-window
# Use Vi mode
setw -g mode-keys vi
# Enable the mouse (e.g. to resize/select pane and windows)
setw -g mouse on
# Copy mode
bind Escape copy-mode
bind -T copy-mode-vi y send-keys -X copy-pipe 'xclip -in -selection clipboard'
#bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard' #(old tmux version)
#unbind [
# More straight forward key bindings for splitting
unbind %
bind | split-window -h
bind h split-window -h
unbind '"'
bind - split-window -v
bind v split-window -v
# Select window
bind '"' choose-window
# Session
bind C new-session
bind R command-prompt "rename-session '%%'"
bind g command-prompt "attach -t '%%'"
# Reload tmux config easily
bind r source-file "~/.tmux.conf"
# Lock the console
set-option -g lock-command '/usr/bin/vlock'
bind x lock-client
bind X lock-server
# History
set -g history-limit 10000
# Start window counter at 1 (0 is too far ;)
set -g base-index 1
# Pane (ctrl-s: down)
unbind o
bind C-s select-pane -t :.-
# Terminal emulator window title
set-window-option -g automatic-rename on
set -g set-titles on
set -g set-titles-string '#W'
# Status Bar (now using powerline scripts)
set -g status on
set -g status-bg black
set -g status-fg cyan
set -g status-interval 2
set -g status-justify "centre"
set -g status-left-length 60
set -g status-right-length 90
set -g status-left "#(~/.dotfiles/tmux/powerline/status-left.sh)"
set -g status-right "#(~/.dotfiles/tmux/powerline/status-right.sh)"
# Notifying if other windows has activities
setw -g monitor-activity on
set -g visual-activity on
# Highlighting the active window in status bar
setw -g window-status-current-bg cyan
setw -g window-status-current-fg black
# Clock
setw -g clock-mode-colour cyan
setw -g clock-mode-style 24
# Set default terminal to support 256 colors
set -g default-terminal "screen-256color"
# Use xterm bindings (in order to have CTRL-Arrow in VIM for example)
set-window-option -g xterm-keys on
# Fix the scrolling issue
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Easy keybindings for moving between windows/panes
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
bind -n S-Left previous-window
bind -n S-Right next-window