-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
65 lines (54 loc) · 2.17 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
# To reload: prefix :source-file ~/.tmux.conf
# Use C-a instead of C-b
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# VI mode (buffer navigation and searching)
set-window-option -g mode-keys vi
# VI mode (begin selection/copy selection)
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
# Mouse on (hold shift/opt key down to copy text using mouse)
set -g mouse on
# Pane Borders
set -g pane-border-style fg=white
set -g pane-active-border-style fg=colour250 # gray
# Windows
set -g renumber-windows on # Rename windows chronologically when deleted
# Style
# Colors from solarized theme
set -g status-style fg="#6c71c4",bg="#eee8d5"
setw -g window-status-current-format "#[fg=#eee8d5]#[bg=#6c71c4]#{window_index}:#[fg=#eee8d5,bold]#[bg=#6c71c4]#{window_name}*"
# Status bar
#
# Status Formatting:
# #(cmd) - display command output
#
# Date Formatting:
# %H - hour (01..24)
# %I - hour (01..12)
# %M - minute (01..59)
# %p - locale's equivalent of either AM or PM; blank if not known
# %P - like %p, but lower case
set -g status-justify centre
set -g status-left "#(TZ="America/Los_Angeles" date '+%%I:%%M%%P') #[bold]#{session_name}#[nobold] #{host_short}"
set -g status-left-length 40
set -g status-right "#{host_short} #[bold]#{session_name}#[nobold] #(TZ="America/Los_Angeles" date '+%%I:%%M%%P')"
set -g status-right-length 40
# Some remote machines rename the window
set-option -g allow-rename off
# Weird tmux/vim and escape key issue
set -sg escape-time 0
# Coloring. Allow "True color"
# Note that this requires updated iTerm2, Mosh, and Tmux versions and configs
# To test this, can use this command:
# curl -sSf https://raw.githubusercontent.com/JohnMorales/dotfiles/master/colors/24-bit-color.sh | bash
# References:
# https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-rgb-colour
# https://stackoverflow.com/questions/41783367/tmux-tmux-true-color-is-not-working-properly
# Allow applications inside tmux to use 256 color
set -g default-terminal "tmux-256color"
# Enable RGB colour if running in xterm
set -as terminal-features ",xterm*:RGB"
# Ensure zsh shell is used by default
set-option -g default-shell /bin/zsh