diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-12-20 10:53:14 -0500 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-12-20 10:54:02 -0500 |
| commit | 7b6dbb921650e2a52929f025b67be57609fda6d4 (patch) | |
| tree | 895416312698cfe4ac61d4eed0f071d7743c0214 /.config/tmux | |
| parent | Remove openbsd conditional in zsh (diff) | |
| download | dotfiles-7b6dbb921650e2a52929f025b67be57609fda6d4.zip | |
Rework dotfiles to *only* contain dotfiles
Diffstat (limited to '.config/tmux')
| -rw-r--r-- | .config/tmux/key-remappings.tmux | 19 | ||||
| -rw-r--r-- | .config/tmux/macos.tmux | 13 | ||||
| -rw-r--r-- | .config/tmux/options.tmux | 40 | ||||
| -rw-r--r-- | .config/tmux/plugins.tmux | 46 | ||||
| m--------- | .config/tmux/plugins/tmux-continuum | 0 | ||||
| m--------- | .config/tmux/plugins/tmux-fzf | 0 | ||||
| m--------- | .config/tmux/plugins/tmux-open | 0 | ||||
| m--------- | .config/tmux/plugins/tmux-resurrect | 0 | ||||
| m--------- | .config/tmux/plugins/tmux-sensible | 0 | ||||
| m--------- | .config/tmux/plugins/tmux-toggle-term | 0 | ||||
| m--------- | .config/tmux/plugins/tmux-yank | 0 | ||||
| m--------- | .config/tmux/plugins/tokyo-night-tmux | 0 | ||||
| m--------- | .config/tmux/plugins/tpm | 0 | ||||
| m--------- | .config/tmux/plugins/vim-tmux-navigator | 0 | ||||
| -rw-r--r-- | .config/tmux/vi.tmux | 6 |
15 files changed, 124 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/macos.tmux b/.config/tmux/macos.tmux new file mode 100644 index 0000000..4555ea5 --- /dev/null +++ b/.config/tmux/macos.tmux @@ -0,0 +1,13 @@ +# Related: [issue #67](https://github.com/tmux-plugins/tpm/issues/67) +set-environment -g PATH "/opt/homebrew/bin:/bin:/usr/bin" + +set -g default-command "reattach-to-user-namespace -l /bin/zsh" + +# Prefix C-c copy buffer to system clipboard +bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" + +# Prefix C-v paste system clipboard into tmux +bind C-v run "tmux set-buffer \"$(reattach-to-user-namespace pbpaste)\"; tmux paste-buffer" + +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" +bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" diff --git a/.config/tmux/options.tmux b/.config/tmux/options.tmux new file mode 100644 index 0000000..c4e1ee6 --- /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 (macOS) +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..9f7fa90 --- /dev/null +++ b/.config/tmux/plugins.tmux @@ -0,0 +1,46 @@ +# Plugin manager +set-environment -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.config/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 '$HOME/.config/tmux/plugins/tpm/tpm' diff --git a/.config/tmux/plugins/tmux-continuum b/.config/tmux/plugins/tmux-continuum new file mode 160000 +Subproject 0698e8f4b17d6454c71bf5212895ec055c578da diff --git a/.config/tmux/plugins/tmux-fzf b/.config/tmux/plugins/tmux-fzf new file mode 160000 +Subproject 05af76daa2487575b93a4f604693b00969f19c2 diff --git a/.config/tmux/plugins/tmux-open b/.config/tmux/plugins/tmux-open new file mode 160000 +Subproject 763d0a852e6703ce0f5090a508330012a7e6788 diff --git a/.config/tmux/plugins/tmux-resurrect b/.config/tmux/plugins/tmux-resurrect new file mode 160000 +Subproject cff343cf9e81983d3da0c8562b01616f12e8d54 diff --git a/.config/tmux/plugins/tmux-sensible b/.config/tmux/plugins/tmux-sensible new file mode 160000 +Subproject 25cb91f42d020f675bb0a2ce3fbd3a5d96119ef diff --git a/.config/tmux/plugins/tmux-toggle-term b/.config/tmux/plugins/tmux-toggle-term new file mode 160000 +Subproject 7837a88380da6057b81d1f741d39a79bc83993c diff --git a/.config/tmux/plugins/tmux-yank b/.config/tmux/plugins/tmux-yank new file mode 160000 +Subproject acfd36e4fcba99f8310a7dfb432111c242fe739 diff --git a/.config/tmux/plugins/tokyo-night-tmux b/.config/tmux/plugins/tokyo-night-tmux new file mode 160000 +Subproject caf6cbb4c3a32d716dfedc02bc63ec8cf238f63 diff --git a/.config/tmux/plugins/tpm b/.config/tmux/plugins/tpm new file mode 160000 +Subproject 99469c4a9b1ccf77fade25842dc7bafbc8ce994 diff --git a/.config/tmux/plugins/vim-tmux-navigator b/.config/tmux/plugins/vim-tmux-navigator new file mode 160000 +Subproject c45243dc1f32ac6bcf6068e5300f3b2b237e576 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 |