irongit
dotmux/tmux.conf
98 lines3.0 KB
1# fIX TERMINAL
2set-option -ga terminal-overrides ",xterm-256color:Tc:allow-passthrough"
3set -g xterm-keys on
4set -g allow-passthrough on
5set -ga update-environment TERM
6set -ga update-environment TERM_PROGRAM
7set -g history-limit 4000
8
9# Enable clipboard for wayland
10set-option -g set-clipboard on
11bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
12bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "wl-copy"
13
14# Style unused terminal panes
15set -g window-style 'fg=colour247,bg=colour236'
16set -g window-active-style 'fg=colour250,bg=black'
17set -g pane-border-lines "double"
18
19# Vim keys in copy mode
20set -g mode-keys vi
21
22# Automatic continuum-restore
23set -g @continuum-restore 'on'
24
25# Automatic window name
26setw -g automatic-rename-format "#{b:pane_current_path}"
27
28# Automatic pane name that also allows custom pane title in the beginning
29set -g pane-border-status top
30
31# Rename pane keybinding (yes select-pane is misleading)
32bind r command-prompt -I "" "select-pane -T '%%'"
33
34# Easier to enter scroll mode
35bind -n C-0 copy-mode
36
37# Set the session to the current pane's directory
38bind a attach -c "#{pane_current_dir}"
39
40# Close pane with alt q
41bind -n M-q kill-pane
42
43# New panes with alt
44bind -n M-n split-window -v
45bind -n M-N split-window -h
46
47# Vim like resizing with shift alt
48bind -n M-H resize-pane -L 5
49bind -n M-J resize-pane -D 5
50bind -n M-K resize-pane -U 5
51bind -n M-L resize-pane -R 5
52
53# Vim like movements with alt
54bind -n M-h select-pane -L
55bind -n M-l select-pane -R
56bind -n M-k select-pane -U
57bind -n M-j select-pane -D
58
59# Zoom with simple alt f
60bind -n M-f resize-pane -Z
61
62# New stuff opens in same directory as starting pane
63bind \" split-window -c "#{pane_current_path}"
64bind % split-window -h -c "#{pane_current_path}"
65bind c new-window -c "#{pane_current_path}"
66
67# No more confirmation to close things
68bind x kill-pane
69bind & kill-window
70
71# Remove accidental cycle windows
72unbind -T prefix Space
73
74# popups
75bind h display-popup -E -w 95% -h 95% -T "Htop" htop
76bind g display-popup -E -w 95% -h 95% -T "Lazygit" -d "#{pane_current_path}" lazygit
77bind D display-popup -E -w 95% -h 95% -T "Docker Stats" docker stats
78bind S display-popup -E -w 95% -h 95% -T "System" systemctl-tui
79bind u display-popup -E -w 95% -h 95% -T "Upload Dotfiles" -d "$HOME/.dotfiles" "$HOME/.dotfiles/sync-then-lazygit.sh"
80
81# Resurrect settings
82set -g @continuum-save-interval '10'
83set -g @resurrect-processes 'false'
84# Force continuum save via hook since powerline owns status-right
85set-hook -g pane-focus-in 'run-shell -b "~/.config/tmux/plugins/tmux-continuum/scripts/continuum_save.sh"'
86
87# List of plugins
88set -g @plugin 'tmux-plugins/tpm'
89set -g @plugin 'tmux-plugins/tmux-sensible'
90set -g @plugin 'tmux-plugins/tmux-resurrect'
91set -g @plugin 'tmux-plugins/tmux-continuum'
92set -g @plugin 'erikw/tmux-powerline'
93set -g @plugin 'huncholane/tmux-fzf-keys'
94set -g @plugin 'omerxx/tmux-sessionx'
95set -g @plugin 'Morantron/tmux-fingers'
96
97# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
98run '~/.config/tmux/bootstrap-tpm.sh'