-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
129 lines (110 loc) · 5.07 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
120
121
122
123
124
125
126
127
128
129
# References-------------------------------------------------------------------
# <a href="http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/" title="http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/">http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiple...</a>
# <a href="https://wiki.archlinux.org/index.php/Tmux" title="https://wiki.archlinux.org/index.php/Tmux">https://wiki.archlinux.org/index.php/Tmux</a>
#
#-- Delay----------------------------------------------------------------------
# setting the delay between prefix and command
set -s escape-time 1
#-- Prefix---------------------------------------------------------------------
set -g prefix C-a
#-- Index----------------------------------------------------------------------
# index start from 1
set -g base-index 1
set -g pane-base-index 1
#-- hMyZsh ftw! --------------------------------------------------------------
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
#-- Color --------------------------------------------------------------------
# 256 color
set -g default-terminal "xterm-256color"
set-window-option -g xterm-keys on
set-window-option -g mode-keys vi
#-- For pbcopy and pbpaste ---------------------------------------------------
# set-option -g default-command "reattach-to-user-namespace -l bash"
#--Key-Bindings-----------------------------------------------------------------
bind | split-window -h
bind - split-window -v
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
# l is for last window by default. i'm used to that, but somewhat conflicted
# #bind l select-pane -R
#
#--Status-Bar-------------------------------------------------------------------
# Default colors
set -g status-bg black
set -g status-fg green
# Alert message line
set -g message-fg black
set -g message-bg green
# Left side of status bar
# set -g status-left-length 20
# set -g status-left '#[fg=green][#[bg=black,fg=cyan]#S#[bg=black,fg=blue,dim]:#H#[fg=green]]'
#
# Inactive windows in status bar
set-window-option -g window-status-format '#[fg=cyan,dim]#I#[fg=blue]:#[default]#W#[fg=grey,dim]#F'
# Current or active window in status bar
set-window-option -g window-status-current-bg yellow
set-window-option -g window-status-current-fg black
set-window-option -g window-status-current-format '#[bg=blue,fg=cyan,bold]#I#[bg=blue,fg=cyan]:#[fg=white]#W#[fg=dim]#F'
# Alerted window in status bar. Windows which have an alert (bell, activity or content).
# set-window-option -g window-status-alert-fg red
# set-window-option -g window-status-alert-bg white
##
# Right side of status bar
# set -g status-right '#[fg=yellow]#(date)'
# set -g status-right '#[fg=green][#[fg=white]#T#[fg=green]][#[fg=blue]%d-%m-%Y #[fg=white]%H:%M#[default]#[fg=green]]'
#
# CUSTOM ----------------------------------------------------------------------
set-option -g status on
set-option -g status-interval 2
set-option -g status-justify "left"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/.config/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/.config/tmux-powerline/powerline.sh right)"
#--Usability--------------------------------------------------------------------
set-option -g status-keys vi
set-window-option -g mode-keys vi
# keep tmux msgs around longer
set -g display-time 3000
set -g set-titles off
#--Set window notifications --------------------------------------------------
setw -g monitor-activity on
set -g visual-activity on
setw -g automatic-rename off
#-- Mouse --------------------------------------------------------------------
set -g mouse on
# Don't lose track of SSH_AGENT etc. from parent environment.
set -g update-environment -r
# Copy mode -----------------------------------------------------------------
# Ctrl b Escape # enter copy mode
# # move cursor to the start or end of the desired text string
# v # to activate highlighting
# # move cursor to cover the requisite string
# y # to capture the string
# q # exit copy mode
# Ctrl b p # put/paste the text in the desired location
unbind [
unbind p
#bind Escape copy-mode
#unbind p
#bind p paste-buffer
#bind-key -t vi-copy v begin-selection
#bind-key -t vi-copy y copy-selection
#bind-key -t vi-copy Escape cancel
#-- Custom key binding -------------------------------------------------------
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Ensure that we can send Ctrl-A to another apps
bind C-a send-prefix
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'