-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf-xx
More file actions
150 lines (132 loc) · 4.22 KB
/
.tmux.conf-xx
File metadata and controls
150 lines (132 loc) · 4.22 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# tmux ls
#
#
# tmux list-clients
# tmux list-sessions
# tmux list-commands
# tmux attach -t <sessionname> # enough chars to be unigue
# tmux a -t <sessionname> # enough chars to be unigue - abrev
# tmux kill-server
# tmux kill-session -t <sessionname>
# tmux new -s sessionname -d # detach
#
# session tree: prefix w
# session tree: prefix s
#
# MOVE between SESSSIONS: prefix )
# MOVE between SESSSIONS: prefix (
# MOVE between WINDOWS: prefix n
# MOVE between WINDOWS: prefix p
#
# goto WINDOW: prefix 0-9
#
# Kill window: prefix &
#
# CREATE a WINDOW: prefix c
# RENAME a WINDOW: prefix , # comma
#
# Find a window that contains a string: prefix f
#
# tput colors
# 256
# set -g default-terminal "screen-256color"
#
# Set the base index for windows to 1 instead of 0
set -g base-index 1
# Set the base index of panes to 1 instead of 0
set -g pane-base-index 1
# Setting the prefix from C-b to C-a
set -g prefix C-a
# Free the original Ctrl-b prefix keybinding
unbind C-b
# bind the r to reload ~/.tmux.conf
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# Split virt with vim of .tmux.conf
bind-key M split-window -h "nvim ~/.tmux.conf"
# Ensure that Ctrl-a get passed through to apps hit twice
# Makes ssh and starting a new tmux on top of hosts easier to navigate
bind C-a send-prefix
# splitting windows witn | and -
bind | split-window -h
bind - split-window -v
# Vi mode
set-window-option -g mode-keys vi
# bind hjkl like vim to select panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resize panes with HJKL - -r makes repeatable
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# More time for messages
set -g display-time 2500
# via neovim checkhealth
set -sg escape-time 10
set-option -g focus-events on
set -g bell-action none
# Set bell action just in case
set -g bell-action none
bind = setw -g synchronize-panes
# This setting screws up nano
# bind -n C-x setw synchronize-panes
# This will make sure tmux is at 256 colors.
# I was at tput colors 8 until I added this line here
# set -g default-terminal "screen-256color"
set-option -sa terminal-features ',alacritty:RGB'
set-option -sa terminal-features ',tmux-256color:RGB'
set -g status-bg colour19
set -g status-fg white
#########################
# Turn on mouse mode
#
# Make mouse useful in copy mode
set -g mouse on
# Highlights the window "tab" when write activity
setw -g monitor-activity on
###########################################################################
#
# Trying out
#
###########################################################################
# setw -g window-status-current-format '#{?pane_synchronized,#[bg=red],}#I:#W#F'
# setw -g window-status-format '#{?pane_synchronized,#[bg=red],}#I:#W#F'
###########################################################################
#
# Reqested changes by nvim checkhealth
#
###########################################################################
# set-option -sg escape-time 10
# set-option -sa terminal-overrides ',screen-256color:RGB'
# These didn't work - errors
# setw -g mode-mouse on
# Allow mouse to select which pane to use
# setw -g mouse-select-pane on
# Allow mouse dragging to resize panes
# set -g mouse-resize-pane on
# Allow mouse to select windows
# set -g mouse-select-window on
# tmux plugin manager
# You can <prefix> cap i to install
# You can <prefix> cap U to Update
# man tmux - FORMATS section for status line variables
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# 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-net-speed'
## set -g @net_speed_interfaces "eno1"
## set -g @plugin 'tmux-plugins/tmux-logging'
### set -g status-right "#{download_speed}"
### set -g status-right "#{upload_speed}"
# set -g status-right "#H #{net_speed}"
# # Other examples:
# # set -g @plugin 'github_username/plugin_name'
# # set -g @plugin 'git@github.com/user/plugin'
# # set -g @plugin 'git@bitbucket.com/user/plugin'
#
# # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# run -b '~/.tmux/plugins/tpm/tpm'