-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
90 lines (76 loc) · 4.46 KB
/
.tmux.conf
File metadata and controls
90 lines (76 loc) · 4.46 KB
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
# -- display ------------------------------------------------------------------
set -g history-limit 25000
set-option -g prefix C-j
set -g mouse on
set -s escape-time 0
set -sg repeat-time 600 # increase repeat timeout
set -g focus-events on
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
setw -q -g utf8 on
# -- display ------------------------------------------------------------------
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 1000 # slightly longer status messages display time
set -g status-interval 1 # redraw status line every 1 seconds
set -g monitor-activity on
set -g visual-activity off
set -g status-position bottom
set -g status-justify left
set -g status-style "bg=#000000,fg=#ffffff"
set -g status-left ""
set -g status-right " #S "
set -g status-right-style "bg=#000000,fg=#ffffff,bold"
set -g status-left-length 100
set -g status-right-length 100
set -g window-status-style "bg=#000000,fg=#ffffff"
set -g window-status-current-style "bg=#ffffff,fg=#000000,bold"
set -g window-status-format " #I:#W "
set -g window-status-current-format " #I:#W "
# -- copy mode ----------------------------------------------------------------
bind Enter copy-mode # enter copy mode
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi C-v send -X rectangle-toggle
bind -T copy-mode-vi y send -X copy-selection-and-cancel
bind -T copy-mode-vi Escape send -X cancel
bind -T copy-mode-vi H send -X start-of-line
bind -T copy-mode-vi L send -X end-of-line
# copy to X11 clipboard
if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | xsel -i -b"'
if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | xclip -i -selection clipboard >/dev/null 0>&1"'
# copy to Wayland clipboard
if -b '[ "$XDG_SESSION_TYPE" = "wayland" ] && command -v wl-copy > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | wl-copy"'
# copy to macOS clipboard
if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | pbcopy"'
# copy to Windows clipboard
if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | clip.exe"'
if -b '[ -c /dev/clipboard ]' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - > /dev/clipboard"'
# -- buffers ------------------------------------------------------------------
# bind b list-buffers # list paste buffers
# bind p paste-buffer -p # paste from the top paste buffer
# bind P choose-buffer # choose which buffer to paste from
# -- bind keys ----------------------------------------------------------------
bind-key -r r source-file ~/.tmux.conf
bind-key k kill-server
# bind-key -r v run-shell "tmux neww open -a MacVim ."
# bind-key -r v run-shell "tmux neww vim ."
bind-key -r g run-shell "tmux neww lazygit -ucf /projects/common/.dotfiles/.config/lazygit/config.yml -p ."
bind-key -r h run-shell "tmux neww /projects/common/.dotfiles/scripts/tmux-last-session-switcher.sh"
bind-key -r f run-shell "tmux neww /projects/common/.dotfiles/scripts/tmux-sessionizer.sh"
bind-key -r 0 run-shell "tmux neww docker run -it --rm iypetrov/fireplace-test"
bind-key -r 1 run-shell "tmux neww /projects/common/.dotfiles/scripts/ssh-sessionizer.sh"
bind-key -r 4 run-shell "tmux neww /projects/common/.dotfiles/scripts/profilionizer.sh"
bind-key -r 9 run-shell "tmux neww k9s"
# -- plugins ------------------------------------------------------------------
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'