-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
99 lines (76 loc) · 2.56 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
# Set prefix key to Ctrl + a
unbind-key C-b
set -g prefix 'C-a'
# Send prefix to the inner tmux
bind 'C-a' send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
# Use the mouse
set -g mouse on
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
unbind [
bind ` copy-mode
unbind p
bind p paste-buffer
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'
bind-key -T copy-mode-vi V send-keys -X rectangle-toggle
# Make Ctrl + arrow keys work
set-window-option -g xterm-keys on
# synchronize
bind S setw synchronize-panes
# Set scroll buffer size
set-option -g history-limit 5000
#RGB support
set-option -sa terminal-overrides ',tmux-256color:RGB'
# Allow us to reload our Tmux configuration while
# using Tmux
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Use true colors
set -g default-terminal "tmux-256color"
# Allow passthrough of escape sequences
set -g allow-passthrough on
# New windows and splits open in the same directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'fcsonline/tmux-thumbs'
run-shell ~/.tmux/plugins/tmux-thumbs/tmux-thumbs.tmux
# Restore session
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-nvim 'session'
set -g status-right "CPU: #{cpu_percentage} Batt: #{battery_percentage} | %a %h-%d %H:%M"
# tmux-battery settings
set -g @batt_charging_icon ""
set -g @batt_charged_icon ""
set -g @batt_attached_icon ""
# Run tmuxline.conf if it exists
if-shell "test -f /home/mahmoud/.tmuxline.conf" "source /home/mahmoud/.tmuxline.conf"
set -g default-command /usr/bin/zsh
set -g default-shell /usr/bin/zsh
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'