-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
73 lines (59 loc) · 2.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
# History
set-option -g history-limit 2048
# Terminal emulator window title
set-option -g set-titles on
# set-option -g set-titles-string '#S:#I.#P #W'
set-option -g set-titles-string '#W'
# set terminal
set-option -g default-terminal screen-256color
# Status bar
#set-option -g status-position top
set-option -g status-justify centre
set-option -g status-bg black
set-option -g status-fg white
set-option -g status-interval 5
setw -g window-status-format "#[bg=white,fg=black] #I #[bg=blue,fg=black] #W "
setw -g window-status-current-format "#[bg=white,fg=brightred] #I #[bg=blue,fg=black] #W "
set -g status-justify left
set-option -g status-right '#[bg=green,fg=black] #H #[default] #[bg=yellow,fg=black] %a %d/%m #[default] #[bg=red,fg=black] %H:%M #[default]'
set-option -g status-left ''
# Notifying if other windows has activities
# set-option -g visual-activity on
# set-window-option -g monitor-activity on
# Clock
set-window-option -g clock-mode-colour blue
set-window-option -g clock-mode-style 24
# Start windows and panes at 0
set -g base-index 0
set -g pane-base-index 0
# Fix mouse mode copy paste and use mouse mode by defauly
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
# To copy, left click and drag to highlight text in yellow,
# once you release left click yellow text will disappear and will automatically be available in clibboard
# # Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
## Custom bindings
# Toggle mouse on with ^B m
bind m \
set -g mouse on \;\
display 'Mouse: ON'
# Toggle mouse off with ^B M
bind M \
set -g mouse off \;\
display 'Mouse: OFF'
# reload conf
bind r \
source-file ~/.tmux.conf \;\
display-message ".tmux.conf reloaded"