Last active
October 26, 2023 01:53
-
-
Save ChrisVilches/9ef7e11c15c657c3167db2ba82777560 to your computer and use it in GitHub Desktop.
tmux config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# ~/.config/tmux/tmux.conf | |
# Install TPM and follow instructions: | |
# https://github.com/tmux-plugins/tpm | |
# vim ~/.config/tmux/tmux.conf && tmux source ~/.config/tmux/tmux.conf | |
set -g exit-empty off | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'catppuccin/tmux' | |
set -g @catppuccin_flavour 'mocha' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set-option -sa terminal-overrides ",xterm*:Tc" | |
set -g mouse on | |
# Change/swap windows | |
bind -n C-Pageup previous-window | |
bind -n C-Pagedown next-window | |
bind -n C-S-Pageup swap-window -t -1 \; previous-window | |
bind -n C-S-Pagedown swap-window -t +1 \; next-window | |
# Open panes in current directory | |
bind '"' split-window -v -c "#{pane_current_path}" | |
bind % split-window -h -c "#{pane_current_path}" | |
# Use 1-based indices | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
set-window-option -g pane-base-index 1 | |
set-option -g renumber-windows on | |
# Change layouts | |
bind C-q select-layout even-horizontal | |
bind C-w select-layout even-vertical | |
bind C-e select-layout main-horizontal | |
bind C-r select-layout main-vertical | |
bind C-t select-layout tiled | |
run '~/.tmux/plugins/tpm/tpm' |
TODO: Improve pane navigation.
Use this? https://github.com/christoomey/vim-tmux-navigator
It requires a VIM plugin as well, so I'm not sure.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Always start tmux with this (
~/.zshrc
)You can open a new terminal without tmux by executing:
This will create a new window but it will have
TERM_PROGRAM
set totmux
, so tmux won't load (due to the condition).