-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
70 lines (54 loc) · 2.29 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
set -g default-terminal "tmux-256color" # Fixes colours, but breaks "rails c"
# set -g default-terminal "xterm-256color"
set-option -sa terminal-features ',xterm-256color:RGB'
# Change control key to "a"
set -g prefix C-a
unbind C-b
bind-key C-a send-prefix
# Split windows horizontally and vertically using | and -
unbind %
bind | split-window -h
bind '\' split-window -h
unbind '"'
bind - split-window -v
# Refresh the tmux configuration
unbind r
bind r source-file ~/.tmux.conf
# To resize windows using VIM keys
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -R 5
bind -r h resize-pane -L 5
# Maximise the window size
bind -r m resize-pane -Z
# Enable mouse within tmux
set -g mouse on
# Set the time in milliseconds for which tmux waits after an escape is input
# to determine if it is part of a function or meta key sequences.
# The default is 500 milliseconds.
set -sg escape-time 50
# Enable focus events
set-option -g focus-events on
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v"
bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y"
unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode after dragging with MouseDragEnd1Pane
# Add TPM plugin
# Remember to install: git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
# Install plugins from withint tmux using CTRL-a I
# List of TMUX plugins
set -g @plugin 'dracula/tmux'
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, tmux-ram-usage,
# network, network-bandwidth, network-ping, ssh-session, attached-clients, network-vpn,
# weather, time, mpc, spotify-tui, kubernetes-context, synchronize-panes
set -g @dracula-show-powerline false
set -g @dracula-plugins 'cpu-usage ram-usage battery'
set -g @dracula-show-flags true
# it can accept `hostname` (full hostname), `session`, `shortname` (short name), `smiley`, window
set -g @dracula-show-left-icon 'session'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect' # Persist tmux sessions after computer restart
set -g @plugin 'tmux-plugins/tmux-continuum' # Automatically saves sessions for you every 15 minute
# Init TMUX plugins. (keep this @ the bottom)
run '~/.tmux/plugins/tpm/tpm'