diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | tmux/.config/tmux/key-remappings.tmux (renamed from tmux/.config/tmux/key-remappings.conf) | 5 | ||||
| -rw-r--r-- | tmux/.config/tmux/macos.tmux | 14 | ||||
| -rw-r--r-- | tmux/.config/tmux/options.tmux (renamed from tmux/.config/tmux/options.conf) | 14 | ||||
| -rw-r--r-- | tmux/.config/tmux/plugins.tmux (renamed from tmux/.config/tmux/plugins.conf) | 20 | ||||
| -rw-r--r-- | tmux/.config/tmux/theme.conf | 32 | ||||
| -rw-r--r-- | tmux/.config/tmux/tmux.conf | 10 | ||||
| -rw-r--r-- | tmux/.config/tmux/vi.tmux (renamed from tmux/.config/tmux/vi.conf) | 2 | ||||
| m--------- | tmux/.tmux/plugins/tpm | 0 |
9 files changed, 52 insertions, 46 deletions
@@ -1,2 +1,3 @@ .DS_Store /tags +/tmux/.config/tmux/plugins diff --git a/tmux/.config/tmux/key-remappings.conf b/tmux/.config/tmux/key-remappings.tmux index 1a6cfde..2e71dfe 100644 --- a/tmux/.config/tmux/key-remappings.conf +++ b/tmux/.config/tmux/key-remappings.tmux @@ -1,6 +1,3 @@ -# 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. @@ -16,6 +13,6 @@ bind-key - split-window -v unbind '"' unbind % -bind-key r source-file ~/.config/tmux/tmux.conf +bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded!" bind-key x kill-pane diff --git a/tmux/.config/tmux/macos.tmux b/tmux/.config/tmux/macos.tmux new file mode 100644 index 0000000..02fbde3 --- /dev/null +++ b/tmux/.config/tmux/macos.tmux @@ -0,0 +1,14 @@ +# Related: [issue #67](https://github.com/tmux-plugins/tpm/issues/67) +set-environment -g PATH "/opt/homebrew/bin:/bin:/usr/bin" + +# Setting the namespace +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/tmux/.config/tmux/options.conf b/tmux/.config/tmux/options.tmux index ac1cb84..ab6a97e 100644 --- a/tmux/.config/tmux/options.conf +++ b/tmux/.config/tmux/options.tmux @@ -8,8 +8,11 @@ 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" +# 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 @@ -26,3 +29,10 @@ 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 /bin/zsh diff --git a/tmux/.config/tmux/plugins.conf b/tmux/.config/tmux/plugins.tmux index 58ca774..e5750e3 100644 --- a/tmux/.config/tmux/plugins.conf +++ b/tmux/.config/tmux/plugins.tmux @@ -1,4 +1,5 @@ # Plugin manager +set-environment -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.config/tmux/plugins/" set-option -g @plugin 'tmux-plugins/tpm' # 'Sensible' set of defaults @@ -24,4 +25,21 @@ 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' -run '~/.tmux/plugins/tpm/tpm' +set-option -g @plugin 'tmux-plugins/tmux-yank' +set-option -g @plugin 'tmux-plugins/tmux-open' +set-option -g @plugin 'tmux-plugins/tmux-copycat' + +set-option -g @plugin "janoamaral/tokyo-night-tmux" +set -g @tokyo-night-tmux_theme night +set -g @tokyo-night-tmux_transparent 1 +set -g @tokyo-night-tmux_window_id_style digital +set -g @tokyo-night-tmux_pane_id_style hsquare +set -g @tokyo-night-tmux_zoom_id_style dsquare +set -g @tokyo-night-tmux_terminal_icon +set -g @tokyo-night-tmux_active_terminal_icon +set -g @tokyo-night-tmux_window_tidy_icons 1 +set -g @tokyo-night-tmux_show_datetime 1 +set -g @tokyo-night-tmux_date_format YMD +set -g @tokyo-night-tmux_time_format 24H + +run '$HOME/.config/tmux/plugins/tpm/tpm' diff --git a/tmux/.config/tmux/theme.conf b/tmux/.config/tmux/theme.conf deleted file mode 100644 index f0668ae..0000000 --- a/tmux/.config/tmux/theme.conf +++ /dev/null @@ -1,32 +0,0 @@ -# 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 4783498..4d2dbde 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -6,9 +6,9 @@ # https://github.com/tmux-plugins/tpm/issues/67#issuecomment-319561401 set-environment -g PATH "/usr/local/bin:/bin:/usr/bin" -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 +source-file ~/.config/tmux/key-remappings.tmux +source-file ~/.config/tmux/options.tmux +source-file ~/.config/tmux/vi.tmux +if-shell "uname | grep -q Darwin" "source-file ~/.config/tmux/macos.tmux" +source-file ~/.config/tmux/plugins.tmux diff --git a/tmux/.config/tmux/vi.conf b/tmux/.config/tmux/vi.tmux index 6592f10..85f2f37 100644 --- a/tmux/.config/tmux/vi.conf +++ b/tmux/.config/tmux/vi.tmux @@ -1,8 +1,6 @@ -# 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 - diff --git a/tmux/.tmux/plugins/tpm b/tmux/.tmux/plugins/tpm deleted file mode 160000 -Subproject 99469c4a9b1ccf77fade25842dc7bafbc8ce994 |