-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf.linux
More file actions
84 lines (68 loc) · 3.36 KB
/
tmux.conf.linux
File metadata and controls
84 lines (68 loc) · 3.36 KB
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
#####################
# KEYBINDINGS #
#####################
# remap prefix from Ctrl+B to Ctrl+A
unbind C-b
set -g prefix C-a
bind C-a send-prefix
#####################
# BEHAVIOUR #
#####################
set -g base-index 1 # start window at 1
set -g pane-base-index 1 # start pane at 1
set -g renumber-windows on # renumber windows when window is closed
set -g allow-rename off # stop ruto enaming windows
# Linux only
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"
#####################
# VISUAL CHANGES #
#####################
set -g status-position top # status bar at top
set -g status-style "fg=colour6,bg=black" # {fore,back}ground colours
set -g window-status-separator " " # status separator - space
set -g status-left "" # left status bar not used
set -g default-terminal "screen-256color"
set -ag terminal-overrides ",screen-256color:RGB"
set -g mouse on # # this is to scroll inside terminal
set -g set-clipboard on
# right status bar - prefix/copy status - iso8601 date + time
set -g status-right "#{prefix_highlight} #[fg=black,bg=colour6] %y-%m-%d #[bg=black] #[fg=white, bg=colour4] %H:%M "
# current window
set -g window-status-current-format "#[fg=black,bg=colour4] #I #[fg=colour4,bg=colour240,bold] #W "
# standard window
set -g window-status-format "#[fg=colour6,bg=colour238] #I #[fg=colour6,bg=colour238] #W "
# panes
set -g pane-active-border-style "fg=colour4,bg=colour236" # active pane style
set -g pane-border-style "fg=colour238,bg=colour236" # inactive pane style
# messages
set -g message-style "fg=black,bg=colour5"
# prefix highlight
set -g @prefix_highlight_fg black # highlight foreground
set -g @prefix_highlight_bg colour5 # highlight background
set -g @prefix_highlight_show_copy_mode on # show when in copy-mode
set -g @prefix_highlight_copy_mode_attr fg=black,bg=yellow # copy-mode bg/fg
#####################
#TMUX PLUGIN MANAGER#
#####################
# conform to XDG base directory specification
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins'
# install TPM if not already installed
if "test ! -d ~/.config/tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm'"
# initialise TPM (always keep at bottom of tmux.conf)
run ~/.config/tmux/plugins/tpm/tpm