-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
109 lines (90 loc) · 3.28 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
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
# Sources of inspiration:
# https://github.com/gpakosz/.tmux/blob/master/.tmux.conf
set -g default-terminal "screen-256color"
set -g prefix C-a
set -g default-shell /bin/zsh
bind C-a send-prefix
unbind C-b
bind \; command-prompt
set -s escape-time 10 # faster command sequences
set -q -g utf8 on
set -g history-limit 5000 # bump history
set -g set-titles on # set terminal title
set -g status-interval 10 # redraw status line every 10 seconds
set -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
setw -g mode-keys vi
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Conflicts with prefix+o too much
unbind C-o
# Copy mode
# Use v to trigger selection
bind-key -T copy-mode-vi v send-keys -X begin-selection
# # Use y to yank current selection
bind-key -T copy-mode-vi y send-keys -X copy-selection -x
# vim pane navigation
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# additional splitting
bind | split-window -h -c "#{pane_current_path}"
bind h split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind v split-window -v -c "#{pane_current_path}"
# Start new window in current directory
bind C new-window -c "#{pane_current_path}"
# Start widows at 1
set -g base-index 1
# pane resizing
bind-key -r K resize-pane -U 10
bind-key -r J resize-pane -D 10
bind-key -r H resize-pane -L 10
bind-key -r L resize-pane -R 10
## Styling (using dracula theme instead)
# Hint print color pallette
# for i in {0..255}; do
# printf "\x1b[38;5;${i}mcolour${i}\x1b[0m\n"
# done
# less colourful status
# set -g status-bg black
# set -g status-fg white
# set -g status-position bottom
# Create a "tab bar" for windows
# set -g status-style "bg=default"
# set -g window-status-current-style "bg=default,reverse"
# set -g window-status-separator '' # No spaces between windows in the status bar.
# set -g window-status-format "#{?window_start_flag,, }#I:#W#{?window_flags,#F, } "
# set -g window-status-current-format "#{?window_start_flag,, }#I:#W#{?window_flags,#F, } "
# Pane styles
# set -g pane-border-style fg=color235
# set -g pane-active-border-style fg=color240
# Command style
# set -g message-style fg=yellow,bg=black
# Copy mode
set -g mode-style 'fg=color195,bg=color235,bold'
# Dracula theme
set -g @dracula-show-powerline true
set -g @dracula-plugins "cpu-usage ram-usage battery"
set -g @dracula-show-flags true
set -g @dracula-show-left-icon session
set -g @dracula-border-contrast false
# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'jaclu/tmux-menus'
set -g @plugin 'wfxr/tmux-fzf-url'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'dracula/tmux'
# Tell tmux-resurrect to restore vim sessions
set -g @resurrect-strategy-nvim 'session'
# Continuously save session state every 15 minutes
# To manually delete saved state $ rm -r ~/.local/share/tmux/resurrect
set -g @continuum-restore 'on'
# TMUX plugin manager (keep near bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
# Set mouse mod to on but doesn't seem to work
set -g mouse on