-
Notifications
You must be signed in to change notification settings - Fork 19
/
.tmux.conf
95 lines (72 loc) · 2.7 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
###################################################################
# General
###################################################################
# Workaround to allow acessing OSX pasteboard
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Appropriate terminal colors
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# Start tabs at index 1
set -g base-index 1
# Make pane numbering consistent with windows
setw -g pane-base-index 1
# Renumber windows when a window is closed
set -g renumber-windows on
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
###################################################################
# Key-bindings
###################################################################
# Free the original `Ctrl-b` prefix keybinding.
unbind C-b
# set prefix key to ctrl-a
set -g prefix C-a
# set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
# mouse? real hackers don't use a mouse
set-option -g mouse off
# vi keys for switching panes
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Splitting panes.
bind | split-window -h
bind - split-window -v
# # Vi copypaste
setw -g mode-keys vi
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# shift-movement keys will resize panes
bind J resize-pane -D 5
bind K resize-pane -U 5
bind H resize-pane -L 5
bind L resize-pane -R 5
bind M-j resize-pane -D
bind M-k resize-pane -U
bind M-h resize-pane -L
bind M-l resize-pane -R
# No delay for escape key press
set -sg escape-time 0
# Reload the file with Prefix r.
bind r source-file ~/.tmux.conf \; display "Reloaded .tmux.conf!"
###################################################################
# Plugins
###################################################################
# Thanks @gfarrell!
# https://github.com/gfarrell/dotfiles/blob/master/tmux/tmux.conf#L61
# plugins
set -g @plugin 'lucasfcosta/catpuccin-tmux' # tmux theme <3
set -g @plugin 'tmux-plugins/tmux-cpu' # shows cpu status in status bar
set -g @plugin 'tmux-plugins/tmux-battery' # shows battery stats in status bar
set -g @plugin 'tmux-plugins/tmux-online-status' # shows internet status in status bar
set -g @plugin 'tmux-plugins/tmux-pain-control' # better control of panes
set -g @plugin 'tmux-plugins/tmux-resurrect' # persists sessions between shutdowns/restarts
set -g @plugin 'tmux-plugins/tmux-continuum' # continuous save/reload sessions
set -g @plugin 'robhurring/tmux-spotify' # spotify songs
# Initialize tpm
run '~/.tmux/plugins/tpm/tpm'