-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
119 lines (93 loc) · 3.56 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# tmux configuration file
# written by ryz
#
# works with tmux v1.8 or higher
# last update: 2015-01-15
# ---------------
# General options
# ---------------
# Use UTF-8
set -g utf8
set-window-option -g utf8 on
# Set login shell (zsh) as default shell on init
set-option -g default-shell $SHELL
# Report a sane terminal type with colors
set -g default-terminal "screen-256color"
# Start window and pane numbering at 1 (default: 0)
set -g base-index 1
setw -g pane-base-index 1
# Renumber windows when a window is closed
set -g renumber-windows on
# No delay for Escape key press
set -sg escape-time 0
# Window size scaling behavior for multiple clients
setw -g aggressive-resize on
# Set scrollback history to 10.000 (default: 2000)
set -g history-limit 10000
# Show status messages for longer (default: 750)
set-option -g display-time 2000
# Activity monitoring
setw -g monitor-activity on
# vi-keys in copy/scrollback and command modes
setw -g mode-keys vi
set -g status-keys vi # press esc in command mode (prefix + :) to manipulate the prompt
# Mouse support and functions
set -g mode-mouse on # Enable the mouse
set -g mouse-utf8 on # Use UTF-8
setw -g mouse-select-window on # Click on window names to switch them
setw -g mouse-select-pane on # Click inside a pane to select it
setw -g mouse-resize-pane on # Click-drag pane edges to resize them
# ------------
# Key bindings
# ------------
# easy-to-remember split pane commands (remove old ones)
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# Act more like GNU screen
unbind C-b # Remove default tmux prefix (Ctrl-b)
set -g prefix C-a # Set screen-like prefix (Ctrl-a)
bind C-a last-window # hit C-a two times to quickly switch windows like in GNU screen
# Reload (this) config file and confirm it
bind r source-file ~/.tmux.conf \; display-message "tmux config file reloaded!"
# Vi-like movement through panes via hjkl
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Vi-like copy mode
bind-key Escape copy-mode
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# ----------
# Status bar
# ----------
set-option -g status on # enable status bar
set -g status-utf8 on # set utf-8
set -g status-interval 1 # update frequency (default 10 sec)
set -g status-justify left # Align window list on the left (left|centre|right)
#set-option -g status-position top # position the status bar at top of screen
# Colors, general
set -g status-bg black
set -g status-fg white
set -g status-attr bright
# Colors, window list and selected window
set-window-option -g window-status-fg white
set-window-option -g window-status-bg black
set-window-option -g window-status-attr dim
set-window-option -g window-status-current-fg black
set-window-option -g window-status-current-bg green
set-window-option -g window-status-current-attr bright
# Status bar length
set -g status-left-length 25 # Increase length of the lefthand status (default is 10)
set -g status-right-length 25 # Increase length of the righthand status (default is 10)
# Set and format the actual status bar
# Colorscheme: green, white, grey
# Preview: '{hostname} ~ {windowlist} {date} {time}'
set -g status-left "#[fg=green]#H #[fg=white]~"
set -g status-right " #{?client_prefix,#[reverse]P#[noreverse],} %d.%m.%y, #(date -u | awk '{print $4}')"
# Old, personal GNU screen statusbar ported to tmux
# Preview: '[] ({hostname}) :: {windowlist} :: {date} {time} []'
#set -g status-left "#[bg=white] #[bg=black] (#[fg=green]#H#[fg=white]) ::"
#set -g status-right ":: %d.%m.%y, #(date -u | awk '{print $4}') #[bg=white] "