forked from denlab/stumpwm-config
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.tmux-server.conf
107 lines (87 loc) · 2.95 KB
/
.tmux-server.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
#------------------------------------------------------------------------------
# SHORTCUT
#------------------------------------------------------------------------------
unbind C-b
# changing default prefix to CTRL+[
set -g prefix C-q
# Set key mode
set -gw mode-keys emacs
set -gw status-keys emacs
# override home-manager's send-prefix when using q as prefix key
bind q display-panes
# override home-manager's send-prefix when [ as prefix key
bind o copy-mode
# Use `<prefix> y` instead of `<prefix> ]`
bind y paste
# reload .tmux.conf file without killing the server
bind r source-file ~/.tmux.conf \; display-message "tmux setup reloaded..."
# split window horizontally (like %)
bind | split-window -h
# split window vertically (like ")
bind - split-window -v
# Do not modify titles
set -g set-titles off
# No escape time between the prefix command and the following type
set -s escape-time 0
# Update environment variables
set -ga update-environment "DISPLAY GPG_AGENT_INFO SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
# Copy and paste configuration
bind C-w run "tmux show-buffer | xclip -i -selection clipboard"
# Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
bind C-y run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
# use the vim motion keys to move between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Decrease
bind = resize-pane -D 4
# Increase
bind + resize-pane -U 4
# go to the last window C-[ C-a
bind-key C-a last-window
#------------------------------------------------------------------------------
# DEFAULT CONFIGURATION
#------------------------------------------------------------------------------
set -g status-interval 2
# source '/usr/share/tmux/powerline.conf'
# start windows index at 1
set -g base-index 1
# start panes index at 1
setw -g pane-base-index 1
# UTF8 options
set-option -g default-terminal "screen-256color"
# history limit
set -g history-limit 8196
# Toggle mouse on with ^B m
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'
# promote the current pane to have the full window
unbind (
bind ( \
new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
swap-pane -s tmux-zoom.0 \;\
select-window -t tmux-zoom
# back to its normal size
unbind )
bind ) \
last-window \;\
swap-pane -s tmux-zoom.0 \;\
kill-window -t tmux-zoom
# Monitor for activity in the window. Window with activity are highlighted in the status line
setw -g monitor-activity on
# Notify that there is activity on buffers
set -g visual-activity on
# Automatically rename the pane as commands is running
setw -g automatic-rename