diff options
| author | Eugene Triguba <eugene.triguba@paymentworks.com> | 2025-05-20 12:53:19 -0400 |
|---|---|---|
| committer | Eugene Triguba <eugene.triguba@paymentworks.com> | 2025-05-20 12:53:19 -0400 |
| commit | 578245703d9345a7888455928dc3080c4ccc1bad (patch) | |
| tree | 48f35f1cc303c4373af8f3600fe596b1522953d0 /tmux | |
| parent | enable hyperlinks in tmux (diff) | |
| parent | use tokyonight moon and turn off plugin update notify (diff) | |
| download | dotfiles-578245703d9345a7888455928dc3080c4ccc1bad.zip | |
Merge branch 'main' of github.com:eugenetriguba/dotfiles
Diffstat (limited to 'tmux')
| -rw-r--r-- | tmux/.config/tmux/key-remappings.conf | 21 | ||||
| -rw-r--r-- | tmux/.config/tmux/options.conf | 26 | ||||
| -rw-r--r-- | tmux/.config/tmux/plugins.conf | 25 | ||||
| -rw-r--r-- | tmux/.config/tmux/theme.conf | 32 | ||||
| -rw-r--r-- | tmux/.config/tmux/tmux.conf | 162 | ||||
| -rw-r--r-- | tmux/.config/tmux/vi.conf | 8 |
6 files changed, 117 insertions, 157 deletions
diff --git a/tmux/.config/tmux/key-remappings.conf b/tmux/.config/tmux/key-remappings.conf new file mode 100644 index 0000000..1a6cfde --- /dev/null +++ b/tmux/.config/tmux/key-remappings.conf @@ -0,0 +1,21 @@ +# Start from a blank slate. Unremap all default key bindings. +# unbind-key -a + +# 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. +# +# Split panes using | for horizontal splits and - for vertical splits +bind-key | split-window -h +bind-key - split-window -v +unbind '"' +unbind % + +bind-key r source-file ~/.config/tmux/tmux.conf +bind-key x kill-pane + diff --git a/tmux/.config/tmux/options.conf b/tmux/.config/tmux/options.conf new file mode 100644 index 0000000..a06803b --- /dev/null +++ b/tmux/.config/tmux/options.conf @@ -0,0 +1,26 @@ +# 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 + +# Set terminal colors +# set-option -g default-terminal "screen-256color" + +# 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 + +# 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 + diff --git a/tmux/.config/tmux/plugins.conf b/tmux/.config/tmux/plugins.conf new file mode 100644 index 0000000..ee2de5e --- /dev/null +++ b/tmux/.config/tmux/plugins.conf @@ -0,0 +1,25 @@ +# Plugin manager +set-option -g @plugin 'tmux-plugins/tpm' + +# 'Sensible' set of defaults +set-option -g @plugin 'tmux-plugins/tmux-sensible' + +TMUX_FZF_ORDER="session|window|pane|command|keybinding" +TMUX_FZF_OPTIONS="-p -w 90% -h 70% -m" +set-option -g @plugin 'sainnhe/tmux-fzf' + +# Persist tmux sessions across system restarts +set-option -g @plugin 'tmux-plugins/tmux-resurrect' +set-option -g @plugin 'tmux-plugins/tmux-continuum' +set -g @resurrect-strategy-nvim 'session' + +# set -g @plugin 'christoomey/vim-tmux-navigator' + +# Save and restore session +# set -g @resurrect-save 'S' +# set -g @resurrect-restore 'R' + +# # more options here: https://github.com/sainnhe/tmux-fzf/issues/6#issuecomment-578750879 +# bind w run-shell -b "~/.config/tmux/plugins/tmux-fzf/scripts/window.sh switch" + +run '~/.tmux/plugins/tpm/tpm' diff --git a/tmux/.config/tmux/theme.conf b/tmux/.config/tmux/theme.conf new file mode 100644 index 0000000..f0668ae --- /dev/null +++ b/tmux/.config/tmux/theme.conf @@ -0,0 +1,32 @@ +# Clock mode +setw -g clock-mode-colour yellow + +# Copy mode +setw -g mode-style 'fg=black bg=red bold' + +set -g pane-border-style 'fg=red' +set -g pane-active-border-style 'fg=yellow' + +# Statusbar +set -g status-position bottom +set -g status-justify left +set -g status-style 'fg=red' + +set -g status-left '' +set -g status-left-length 10 + +set -g status-right-style 'fg=black bg=yellow' +set -g status-right '%Y-%m-%d %H:%M ' +set -g status-right-length 50 + +setw -g window-status-current-style 'fg=black bg=red' +setw -g window-status-current-format ' #I #W #F ' + +setw -g window-status-style 'fg=red bg=black' +setw -g window-status-format ' #I #[fg=white]#W #[fg=yellow]#F ' + +setw -g window-status-bell-style 'fg=yellow bg=red bold' + +# Messages +set -g message-style 'fg=yellow bg=red bold' + diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index cf99070..4783498 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -6,161 +6,9 @@ # https://github.com/tmux-plugins/tpm/issues/67#issuecomment-319561401 set-environment -g PATH "/usr/local/bin:/bin:/usr/bin" -###################################################### -# -# Key Remappings -# -###################################################### - -# Start from a blank slate. Unremap all default key bindings. -# unbind-key -a - - -# 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. -# -# Split panes using | for horizontal splits and - for vertical splits -bind-key | split-window -h -bind-key - split-window -v -unbind '"' -unbind % - -bind-key r source-file ~/.config/tmux/tmux.conf -bind-key x kill-pane - -###################################################### -# -# Options -# -###################################################### - -# 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 hyperlinks -set-option -as terminal-features ",*:hyperlinks" - -# Enable mouse support (clickable windows, panes, resizable panes) -set-option -g mouse on - -# Set terminal colors -# set-option -g default-terminal "screen-256color" - -# 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 - -# 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 - -###################################################### -# -# Theme -# -###################################################### - -# clock mode -setw -g clock-mode-colour yellow - -# copy mode -setw -g mode-style 'fg=black bg=red bold' - -set -g pane-border-style 'fg=red' -set -g pane-active-border-style 'fg=yellow' - -# statusbar -set -g status-position bottom -set -g status-justify left -set -g status-style 'fg=red' - -set -g status-left '' -set -g status-left-length 10 - -set -g status-right-style 'fg=black bg=yellow' -set -g status-right '%Y-%m-%d %H:%M ' -set -g status-right-length 50 - -setw -g window-status-current-style 'fg=black bg=red' -setw -g window-status-current-format ' #I #W #F ' - -setw -g window-status-style 'fg=red bg=black' -setw -g window-status-format ' #I #[fg=white]#W #[fg=yellow]#F ' - -setw -g window-status-bell-style 'fg=yellow bg=red bold' - -# messages -set -g message-style 'fg=yellow bg=red bold' - -# Pane resizing -# bind -n M-h resize-pane -L -# bind -n M-l resize-pane -R -# bind -n M-k resize-pane -U -# bind -n M-j resize-pane -D -# -# # Move window to the left -# bind -n M-i swap-window -t -1 -# -# # Move window to the right -# bind -n M-o swap-window -t +1 -# -# Set vi mode -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 - -# Save and restore session -# set -g @resurrect-save 'S' -# set -g @resurrect-restore 'R' - -# Tmux theme -# set -g @catppuccin_flavour 'mocha' -# set -g @catppuccin_right_separator "█" -# set -g @catppuccin_left_separator "█" -# - -# # more options here: https://github.com/sainnhe/tmux-fzf/issues/6#issuecomment-578750879 -# bind w run-shell -b "~/.config/tmux/plugins/tmux-fzf/scripts/window.sh switch" - -###################################################### -# -# Plugins -# -###################################################### - -# Plugin manager -set-option -g @plugin 'tmux-plugins/tpm' - -# 'Sensible' set of defaults -set-option -g @plugin 'tmux-plugins/tmux-sensible' - -TMUX_FZF_ORDER="session|window|pane|command|keybinding" -TMUX_FZF_OPTIONS="-p -w 90% -h 70% -m" -set-option -g @plugin 'sainnhe/tmux-fzf' - -# Persist tmux sessions across system restarts -set-option -g @plugin 'tmux-plugins/tmux-resurrect' -set-option -g @plugin 'tmux-plugins/tmux-continuum' -set -g @resurrect-strategy-nvim 'session' - -# set -g @plugin 'christoomey/vim-tmux-navigator' +source-file ~/.config/tmux/key-remappings.conf +source-file ~/.config/tmux/options.conf +source-file ~/.config/tmux/vi.conf +source-file ~/.config/tmux/theme.conf +source-file ~/.config/tmux/plugins.conf -run '~/.tmux/plugins/tpm/tpm' diff --git a/tmux/.config/tmux/vi.conf b/tmux/.config/tmux/vi.conf new file mode 100644 index 0000000..6592f10 --- /dev/null +++ b/tmux/.config/tmux/vi.conf @@ -0,0 +1,8 @@ +# Set vi mode +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 + |