Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
dotfiles/tmux.conf at master · Stratus3D/dotfiles · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Stratus3D
dotfiles
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
dotfiles
/
tmux.conf
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
174 lines (130 loc) · 5.38 KB
master
Breadcrumbs
dotfiles
/
tmux.conf
Copy path
Top
File metadata and controls
Code
Blame
174 lines (130 loc) · 5.38 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#
Originally copied from Daniel Nolan's dotfile repo, with heavy modifications
#
#
References
#
#
* http://man.openbsd.org/OpenBSD-current/man1/tmux.1
#
GENERAL SETTINGS
#
----------------
#
use shell set as SHELL env variable as default shell
set-option -g default-shell
$SHELL
#
default terminal is 256 color
set
-g default-terminal
"
screen-256color
"
#
start window index at 1
set
-g base-index 1
set
-g pane-base-index 1
set-window-option -g pane-base-index 1
#
automatically renumber windows as they are created and destroyed
set-option -g renumber-windows on
#
lower the delay between the prefix key and other keys (fixes pause when using vim)
set
-sg escape-time 1
#
use vi-like key bindings for the tmux command prompt
set
-g status-keys vi
#
use vi-like key bindings in copy mode
set-window-option -g mode-keys vi
#
keep up to 8k lines of pane history
set
-g history-limit 8000
#
monitor window activity and generate notifications
set-window-option -g monitor-activity on
#
show activity notifications on status line
set
-g visual-activity on
#
Constrain the window size to the size of the smallest client's window, if that
#
client is looking at it
set-window-option -g aggressive-resize on
#
KEY BINDINGS
#
------------
#
unbind old prefix
unbind C-b
#
remap prefix to Control + a
set
-g prefix C-f
#
prefix-r to force a reload of the config file
unbind r
bind
r source-file
~
/.tmux.conf
\;
display-message
"
~/.tmux.conf reloaded
"
#
quick pane cycling
unbind ^F
bind
^F select-pane -t :.+
#
new 25% vertical split pane
bind
^T split-window -p 25
#
setup 'v' to being selection as in Vim
bind
-T copy-mode-vi v send-keys -X begin-selection
#
once in selection mode use Ctrl-v to switch to block selection mode
bind
-T copy-mode-vi
'
C-v
'
send -X rectangle-toggle
#
begin selection in copy mode.
bind
-T copy-mode-vi
'
y
'
send-keys -X copy-pipe-and-cancel
"
pbcopy
"
#
allow copying with the mouse
bind
-T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
"
pbcopy
"
#
update default binding of `Enter` to also use copy-pipe
bind
-T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel
"
pbcopy
"
#
select panes with <Prefix> h, j, k, l
bind
h select-pane -L
bind
j select-pane -D
bind
k select-pane -U
bind
l select-pane -R
#
resize panes with <Prefix> H, J, K, L
bind
-r J resize-pane -D 5
bind
-r K resize-pane -U 5
bind
-r H resize-pane -L 5
bind
-r L resize-pane -R 5
#
cycle windows with C-h and C-l
bind
-r C-h select-window -t :-
bind
-r C-l select-window -t :+
#
Rebind pane splitting, set current directory to same directory as current pane
bind
|
split-window -h -c
"
#{pane_current_path}
"
bind
- split-window -v -c
"
#{pane_current_path}
"
#
By default show sessions with windows (and panes) collapsed when listing sessions
bind
'
w
'
choose-tree -Zs
#
Smart pane switching with awareness of vim splits
#
See: https://github.com/christoomey/vim-tmux-navigator
is_vim=
'
echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"
'
bind
-n C-h if-shell
"
$is_vim
"
"
send-keys C-h
"
"
select-pane -L
"
bind
-n C-j if-shell
"
$is_vim
"
"
send-keys C-j
"
"
select-pane -D
"
bind
-n C-k if-shell
"
$is_vim
"
"
send-keys C-k
"
"
select-pane -U
"
bind
-n C-l if-shell
"
$is_vim
"
"
send-keys C-l
"
"
select-pane -R
"
bind
-n C-
\\
if-shell
"
$is_vim
"
"
send-keys C-
\\
"
"
select-pane -l
"
#
Turn mouse on with leader m
bind
m \
set
-g mouse on
\;
\
display
'
Mouse: ON
'
#
Turn mouse off with leader M
bind
M \
set
-g mouse off
\;
\
display
'
Mouse: OFF
'
#
A binding to allow xtractor script to extract visible items from a tmux pane
#
The tmux run-shell command will not work here because it runs the command in
#
the background and not within a window. We need the interactive fzf prompt
#
displayed.
bind
b capture-pane
\;
split-window -h
"
tmux show-buffer | xtractor
"
#
Specific bindings for faster common operations
bind
u capture-pane
\;
display-popup -E
"
tmux show-buffer | xtractor urls copy
"
bind
f capture-pane
\;
display-popup -E
"
tmux show-buffer | xtractor paths copy
"
bind
a capture-pane
\;
display-popup -E
"
tmux show-buffer | xtractor urls open
"
bind
e capture-pane
\;
split-window -h
"
tmux show-buffer | xtractor paths edit
"
#
APPEARANCE
#
----------
#
Colors
#
See https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
set-option -g status-style fg=colour8,bg=colour0,default
#
Status line format and colors
set
-g status-left-length 40
set
-g status-left
"
#[fg=colour8]Session: #S
"
set
-g status-right
"
#[fg=colour8][%m/%d/%Y %l:%M%p]
"
set
-g status-justify centre
#
center window list
#
default window title fg, bg, and attribute
set-window-option -g window-status-style fg=colour8,bg=default,default
#
current window title color
set-window-option -g window-status-current-style fg=colour2,bg=default
#
pane border styles
set-option -g pane-border-style fg=colour10,bg=default
set-option -g pane-active-border-style fg=colour29,bg=colour254
#
show pane title above pane
set
-g pane-border-status top
#
make background of non-active panes darker
set
-g window-style fg=default,bg=colour15
set
-g window-active-style fg=default,bg=colour231
#
change color of status line when using prompt
set-option -g message-style fg=colour15,bg=colour1
#
colors for pane numbers when using the display-panes command
set
-g display-panes-active-colour colour33
set
-g display-panes-colour colour166
#
Reverse colors of selected text in pane when in copy or search mode, a bit
#
intense but very easy to see
set
-g mode-style fg=colour6,bg=default,reverse
You can’t perform that action at this time.