-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcterdam.tmux.conf
101 lines (70 loc) · 2.97 KB
/
cterdam.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
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
# vim: filetype=tmux
# General --------------------------------------------------------------------
# Set color otherwise vim lightline cannot display properly
set -g default-terminal "xterm-256color"
# Automatically rename window based on current program and path
set-option -g automatic-rename on
set-option -g automatic-rename-format '[#[bold]#{b:pane_current_command}#[nobold]] #{b:pane_current_path}'
# Enable scrolling terminal output with mouse
setw -g mouse on
# For use by vim-gitgutter
set -g focus-events on
# Use vim key bindings
setw -g mode-keys vi
# Do not wait for escape characters, fix Vim Escape delay
set -sg escape-time 0
# Refresh every second
# This seems to be overridden to 5, so this doesn't work. Setting in shell startup works
set-option -g status-interval 1
# Larger history size
set -g history-limit 50000
# Be more aggressive in resizing panes when terminal window size changes
setw -g aggressive-resize on
# Prefix Ctrl+S to spawn new session
bind C-s command-prompt -p "New Session:" "new-session -A -s '%%'"
# Prefix Ctrl+K to kill a session by name
bind C-k command-prompt -p "Kill Session:" "kill-session -t '%%'"
# Prefix Ctrl+A to list current directory files
bind-key C-a run-shell -b \
"pwd && \
echo '--------------------------------------------------------------' && \
ls -a $(tmux display-message -p -F '#{pane_current_path}')"
# Windows --------------------------------------------------------------------
# Use Ctrl+[H/L] to switch windows
bind j prev
bind k next
# Use Ctrl+[J/K] to swap with neighboring windows
bind h swap-window -t -1 \; prev
bind l swap-window -t +1 \; next
# Plugins --------------------------------------------------------------------
# Using TPM Tmux Plugin Manager
# Prefix Shift+I to install any plugins.
# Prefix Shift+U to update plugins.
# Prefix Alt+U to remove/uninstall plugins not on the plugin list.
# By default, Prefix = Ctrl + B.
# TPM itself
set -g @plugin 'tmux-plugins/tpm'
# Dracula theme for tmux
set -g @plugin 'dracula/tmux'
# Copy to the system clipboard
set -g @plugin 'tmux-plugins/tmux-yank'
# Clipboard ------------------------------------------------------------------
# Use v in copy mode to trigger selection
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Required on macOS for tmux-yank
if-shell "uname | grep -q Darwin" '
set-option -g default-command "reattach-to-user-namespace -l $SHELL"
'
# Do not exit copy mode after yanking
set -g @yank_action 'copy-pipe'
# DRACULA --------------------------------------------------------------------
# Display name of the current session on the left
# This can accept `session`, `smiley`, `window`, or any character
set -g @dracula-show-left-icon session
# Display time on the right
set -g @dracula-plugins "time"
# Use military time
set -g @dracula-military-time true
# TPM ------------------------------------------------------------------------
# Initialize TPM. Keep this line at the very bottom of tmux.conf
run '~/.tmux/plugins/tpm/tpm'