-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
86 lines (54 loc) · 1.81 KB
/
Copy pathtmux.conf
File metadata and controls
86 lines (54 loc) · 1.81 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
# Ref: https://dev.to/iggredible/useful-tmux-configuration-examples-k3g
# improve colors
set -g default-terminal 'screen-256color'
# Reload tmux.conf
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Change default prefix binding
unbind C-a
set -g prefix C-a
bind C-a send-prefix
# Enable mouse
set -g mouse on
# Increase History
set-option -g history-limit 10000
# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
setw -g pane-base-index 1
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# Split windows bindings
bind | split-window -hc "#{pane_current_path}"
bind - split-window -vc "#{pane_current_path}"
# Swapping windows
bind -r "<" swap-window -d -t -1
bind -r ">" swap-window -d -t +1
# Keep current path
bind c new-window -c "#{pane_current_path}"
# Toggle windows
bind Space last-window
# Enable names for panes
set -g pane-border-status top
set -g pane-border-format "#P: #{pane_current_command}"
# Rename window
bind-key , command-prompt -I "#W" "rename-window '%%'"
# Start a non-login shell https://wiki.archlinux.org/title/tmux#Start_a_non-login_shell
set -g default-command "${SHELL}"
# Save commands to a file, like .bash_history
set -g history-file ~/.tmux_history
# soften status bar color from harsh green to light gray
set -g status-style bg='#333333',fg='#cccccc'
# remove administrative debris (session name, hostname, time) in status bar
set -g status-left ''
set -g status-right ''
# don't suspend-client
unbind-key C-z
# act like vim
setw -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
# Local config
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'