-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
executable file
·86 lines (67 loc) · 2.84 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
### Keybindings ###
# Tmux management
set -g prefix C-a
bind r source-file ~/.tmux.conf
# Window management
bind-key -n C-T new-window -c '#{pane_current_path}'
bind-key -n M-up new-window -c '#{pane_current_path}'
bind-key -nr M-right next
bind-key -nr M-left prev
bind-key right next
bind-key left prev
bind-key -n MouseDrag1Status swap-window -t=
# Pane management
bind-key -nr S-left select-pane -L
bind-key -nr S-right select-pane -R
bind-key -nr S-up select-pane -U
bind-key -nr S-down select-pane -D
bind k kill-pane
bind -Troot C-space switchc -TnewPane
bind -TnewPane left split-window -h -c '#{pane_current_path}'
bind -TnewPane right split-window -h -c '#{pane_current_path}'
bind -TnewPane up split-window -v -c '#{pane_current_path}'
bind -TnewPane down split-window -v -c '#{pane_current_path}'
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
# Miscellaneous
bind -TdoubleF11 F11 lsk
bind -Troot F11 switchc -TdoubleF11
# Clipboard management
#Copy tmux paste buffer to CLIPBOARD
bind -n C-[ run "tmux show-buffer | xsel -ipb"
#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
bind -n C-] run "tmux set-buffer -- \"$(xsel -ob)\"; tmux paste-buffer"
### Interface ###
#Enable scrolling with mouse wheel but disable selecting panes with it
set -g mouse on
#Set terminal titles according to what processes running inside want
set-option -g set-titles on
# Renumber windows when one is closed, so the numbers are continuous and tabs open on the right
set-option -g renumber-windows on
#It's easier to press C-b 1 than C-b 0
set-option -g base-index 1
set-window-option -g xterm-keys on
# Uncomment to enable pane border status.
set -g pane-border-status top
set -g pane-border-format "[#{pane_index}]:#{pane_current_command} \"#{pane_current_path}\""
#White on black background for statusbar and pane names
set -g status-style 'fg=white,bg=black'
set-window-option -g window-status-style 'fg=white,bg=default'
#Black on white for selected pane name
set-window-option -g window-status-current-style 'fg=black,bg=white'
### Functional ###
#Update environment... whatever it does
set -g update-environment "DISPLAY WINDOWID SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION GNOME_KEYRING_PID GNOME_KEYRING_SOCKET"
#Update status bar every second,
set -g status-interval 1
# Only reserve 5 chars on the left and put session number there
set -g status-left-length 5
set -g status-left '#[bg=red]#[fg=black](#S)'
set -g status-right-length 60
set -g status-right '#[bg=blue]#[fg=red]#(echo ▼$TMUX_DOWNSPEED)#[fg=default]/\
#[fg=green]#(echo ▲$TMUX_UPSPEED)#[fg=default]\
/#(echo $TMUX_PING)ms#[bg=default]\
#[bg=blue]#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default]\
#[bg=blue]#[fg=cyan]#(echo $TMUX_MEMORY)#[default]\
#[bg=blue]%H:%M#[default]'
run-shell -b '$DOTFILES_DIR/util/tmux_status_updates'