diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2026-10-17 10:40:11 -0700 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2026-10-17 10:40:11 -0700 |
| commit | ea127689e0ae2d39b49004be605e541ff80e2621 (patch) | |
| tree | abbe79e5e37792bd8ebea8f9ac788ff5b8aed704 /.config/tmux | |
| download | openbsd-dotfiles-ea127689e0ae2d39b49004be605e541ff80e2621.zip | |
Initial Commit
Diffstat (limited to '.config/tmux')
| -rw-r--r-- | .config/tmux/key-remappings.tmux | 19 | ||||
| -rw-r--r-- | .config/tmux/options.tmux | 40 | ||||
| -rw-r--r-- | .config/tmux/plugins.tmux | 45 | ||||
| -rw-r--r-- | .config/tmux/vi.tmux | 6 |
4 files changed, 110 insertions, 0 deletions
diff --git a/.config/tmux/key-remappings.tmux b/.config/tmux/key-remappings.tmux new file mode 100644 index 0000000..103722f --- /dev/null +++ b/.config/tmux/key-remappings.tmux @@ -0,0 +1,19 @@ +# Remap prefix from 'C-b' to 'C-a' +# +# This works well if you remap the regular Caps Lock key to Ctrl. +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix + +# Remap pane splits to something more sane than the default. +# +# Split panes using | for horizontal splits and - for vertical splits +bind-key | split-window -h -c "#{pane_current_path}" +bind-key - split-window -v -c "#{pane_current_path}" +unbind '"' +unbind % +bind-key c new-window -c "#{pane_current_path}" + +# Easier configuration reloading and pane killing +bind-key r source-file ~/.tmux.conf \; display-message "Config reloaded!" +bind-key x kill-pane diff --git a/.config/tmux/options.tmux b/.config/tmux/options.tmux new file mode 100644 index 0000000..7cb9075 --- /dev/null +++ b/.config/tmux/options.tmux @@ -0,0 +1,40 @@ +# Don't rename windows automatically. +# +# I often will use the `,` key to rename windows. +# However, by default, tmux will update the window +# title to the last executed command. +set-option -g allow-rename off + +# Enable mouse support (clickable windows, panes, resizable panes) +set-option -g mouse on + +# Enable system clipboard integration +set-option -g set-clipboard on + +# Allow focus events (for editors like Neovim) +set -g focus-events on + +# Start windows and panes at 1, not 0 +set-option -g base-index 1 +set-option -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set-option -g renumber-windows on + +set-option -g status-position top + +# Don't do anything when a 'bell' rings +set-option -g visual-activity off +set-option -g visual-bell off +set-option -g visual-silence off +set-window-option -g monitor-activity off +set-option -g bell-action none + +# Enable hyperlinks +set-option -as terminal-features ",*:hyperlinks" + +# Enable true color support +set -ga terminal-overrides ",*256col*:Tc" +set -ga terminal-overrides ",tmux-256color:Tc" + +set -g default-terminal "tmux-256color" +set -g default-shell $SHELL diff --git a/.config/tmux/plugins.tmux b/.config/tmux/plugins.tmux new file mode 100644 index 0000000..9072828 --- /dev/null +++ b/.config/tmux/plugins.tmux @@ -0,0 +1,45 @@ +set-environment -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.tmux/plugins/" +set-option -g @plugin 'tmux-plugins/tpm' + +# 'Sensible' set of defaults +set-option -g @plugin 'tmux-plugins/tmux-sensible' + +# Tmux FZF is a plugin that integrates FZF with tmux +TMUX_FZF_ORDER="session|window|pane|command|keybinding" +TMUX_FZF_OPTIONS="-p -w 90% -h 70% -m" +set-option -g @plugin 'sainnhe/tmux-fzf' + +# Resurrect is a plugin that saves and restores tmux sessions +set-option -g @plugin 'tmux-plugins/tmux-resurrect' +set-option -g @resurrect-save 'S' +set-option -g @resurrect-restore 'R' + +# Continuum is a plugin that automatically saves tmux sessions +# at regular intervals +set-option -g @plugin 'tmux-plugins/tmux-continuum' +set-option -g @continuum-restore 'on' +set-option -g @continuum-save-interval '15' +set-option -g @resurrect-strategy-nvim 'session' + +# Vim Tmux Navigator allows you to navigate between Vim and tmux panes +set-option -g @plugin 'christoomey/vim-tmux-navigator' + +set-option -g @plugin 'tmux-plugins/tmux-yank' +set-option -g @plugin 'tmux-plugins/tmux-open' + +set-option -g @plugin "janoamaral/tokyo-night-tmux" +set-option -g @tokyo-night-tmux_theme night +set-option -g @tokyo-night-tmux_transparent 1 +set-option -g @tokyo-night-tmux_window_id_style digital +set-option -g @tokyo-night-tmux_pane_id_style hsquare +set-option -g @tokyo-night-tmux_zoom_id_style dsquare +set-option -g @tokyo-night-tmux_terminal_icon +set-option -g @tokyo-night-tmux_active_terminal_icon +set-option -g @tokyo-night-tmux_window_tidy_icons 1 +set-option -g @tokyo-night-tmux_show_git 0 +set-option -g @tokyo-night-tmux_show_wbg 0 +set-option -g @tokyo-night-tmux_show_datetime 0 + +set-option -g @plugin 'https://git.sr.ht/~eugenetriguba/tmux-toggle-term' + +run '~/.tmux/plugins/tpm/tpm' diff --git a/.config/tmux/vi.tmux b/.config/tmux/vi.tmux new file mode 100644 index 0000000..85f2f37 --- /dev/null +++ b/.config/tmux/vi.tmux @@ -0,0 +1,6 @@ +set-window-option -g mode-keys vi + +# Use visual selection mode as vi +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle +bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel |