-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
83 lines (74 loc) · 4.51 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
#=============================================================================
# FileName : .tmux.conf
# Author : [email protected]
# Created : 2020-05-29
# LastChange : 2025-01-23 14:03:26
#=============================================================================
# list of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin "nordtheme/tmux"
set -g @plugin 'egel/tmux-gruvbox'
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
set -g @tmux-gruvbox 'dark256'
set -g @plugin 'marslo/tmux-simple-git-status'
set -g @plugin 'laktak/extrakto'
#-- tmux settings --#
set-option -g set-titles on # set-option terminal title
set-option -g focus-events on # ensure neovim autoread works
set-option -g mouse on
set-option -g history-limit 65535
set-option -g set-titles-string '#h - #S : #I #W' # set terminal title format (uses status bar variables).
set-option -g default-terminal 'xterm-256color'
set -ag terminal-overrides ',xterm-256color:RGB'
set -sg escape-time 0 # disable esc delay
set -g status-interval 30 # set refresh interval for status bar
set -g default-shell /opt/homebrew/bin/bash # set -g default-command "reattach-to-user-namespace -l ${SHELL}"
set -g set-clipboard on
set -g renumber-windows on # auto-renumber windows
set -g detach-on-destroy off # don't exit from tmux when closing a session
setw -g monitor-activity on
set -g visual-activity on
# set -g status-left-length 70 # show host name and ip address on left side of status bar
# set -g status-right-length 60
# set -g list-sessions-format "#{session_created} #{session_name}: #{session_windows} windows (created #{t:session_created})#{?session_grouped, (group ,}#{session_group}#{?session_grouped,),}#{?session_attached, [attached],}"
set -g @tmux-gruvbox-statusbar-alpha 'true'
set -g @tmux-gruvbox-left-status-a "#{simple_git_status}" # '#S'
# set -g @tmux-gruvbox-right-status-x "#{battery_icon} #{battery_percentage}"
set -g @tmux-gruvbox-right-status-x "#(bash $HOME/.tmux/plugins/tmux-cpu/scripts/cpu_icon.sh) #(bash $HOME/.tmux/plugins/tmux-cpu/scripts/cpu_percentage.sh)"
set -g @tmux-gruvbox-right-status-y '%Y-%m-%d %H:%M:%S'
set -g @tmux-gruvbox-right-status-z '#S #{tmux_mode_indicator}'
WINDOW="[#I: #W#F]"
set-window-option -g clock-mode-style 24 # 24 hour clock
set-window-option -g mode-keys vi
#-- display --#
bind-key C-r source-file ~/.tmux.conf \; refresh-client -S \; display-message ".tmux.conf Reloaded!"
bind-key e new-window -n '~/.tmux.conf' '${EDITOR:-vim -u /Users/marslo/.vimrc} ~/.tmux.conf && tmux source ~/.tmux.conf && tmux display "~/.tmux.conf sourced"'
bind-key -r C-h select-window -t :- # use C-h and C-l to cycle thru panes
bind-key -r C-l select-window -t :+
unbind-key '"'
unbind-key %
bind-key - splitw -v -c "#{pane_current_path}" # vsplit windows
bind-key | splitw -h -c "#{pane_current_path}" # hsplit windows
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
bind-key -n C-l send-keys C-l \; run 'tmux clear-history'
# edit mode
bind-key -T edit-mode-vi H send-keys -X start-of-line
bind-key -T edit-mode-vi L send-keys -X end-of-line
bind-key -T edit-mode-vi q send-keys -X cancel
bind-key -T edit-mode-vi Escape send-keys -X cancel
# copy mode
unbind-key -T copy-mode-vi Enter
bind-key -T copy-mode-vi v send-keys -X begin-selection # setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi Escape send-keys -X cancel
bind-key -T copy-mode-vi H send-keys -X start-of-line
bind-key -T copy-mode-vi L send-keys -X end-of-line
set -s command-alias[99] 'ls=list-sessions -F "(created #{t/f/%y-%m-%d %H#:%M#:%S:window_activity}) - #{session_name}: #{session_windows} windows#{?session_grouped - (group ,}#{session_group}#{?session_grouped,),}#{?session_attached, [attached],}"'
run '~/.tmux/plugins/tpm/tpm'