forked from denlab/stumpwm-config
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.tmux.conf
104 lines (81 loc) · 3.01 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
# unbind all keys
# unbind-key -a
#------------------------------------------------------------------------------
# SHORTCUT
#------------------------------------------------------------------------------
# Update environment variables
set-option -g update-environment "DISPLAY GPG_AGENT_INFO SSH_ASKPASS SSH_AUTH_SOCK SSH_CONNECTION WINDOWID XAUTHORITY POWERLINE_CONF"
set-option -g allow-rename off
unbind C-b
# remotely, the prefix used is C-q
# locally, the prefix used is C-[
if-shell '[ -z "$SSH_CONNECTION" ]' 'set -g prefix C-[' 'set -g prefix C-q'
# Set key mode
set -gw mode-keys emacs
set -gw status-keys emacs
# Do not modify titles
set -g set-titles off
# 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
# Small escape time between the prefix command and the following type
# That allows to work better for nested tmux with same prefix key
# (that happens)
set -s escape-time 1
# Copy/paste configuration
bind -Tcopy-mode M-w send-keys -X copy-pipe-and-cancel "xsel --input --clipboard"
# 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
# Toggle between C-[ and C-q
bind t set -g prefix C-q \; display-message "prefix key: C-q"
bind T set -g prefix C-[ \; display-message "prefix key: C-["
#------------------------------------------------------------------------------
# DEFAULT CONFIGURATION
#------------------------------------------------------------------------------
source "$POWERLINE_CONF"
# start windows index at 1
set -g base-index 1
# start panes index at 1
setw -g pane-base-index 1
#------------------------------------------------------------------------------
# plugins
#------------------------------------------------------------------------------
# tmux-urlview (depends on urlview)
set -g @urlview-key 'u' # defaults to u
# <prefix-key> I to trigger local plugin install
# List of plugins
# Supports `github_username/repo` or full git repo URLs
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
jbnicolai/tmux-urlview \
'
# Other examples:
# github_username/plugin_name \
# git@github.com/user/plugin \
# git@bitbucket.com/user/plugin \
# tmux open
set -g @plugin 'tmux-plugins/tmux-open'
# highlight file and open in $EDITOR
set -g @open-editor 'e'
# tmux file path picker (binding f in escape mode)
set -g @plugin 'jbnicolai/tmux-fpp'
# prefix higlight
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'
set -g @prefix_highlight_show_copy_mode 'on'
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell '~/.tmux/plugins/tpm/tpm'