Created
July 8, 2025 05:21
-
-
Save rbudiharso/84a90afd12479873c597ad662b341e89 to your computer and use it in GitHub Desktop.
tmux
This file contains hidden or 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
| set -g mouse on | |
| set -sa terminal-overrides ",tmux-256color:RGB" | |
| # map prefix to ctrl+space | |
| unbind C-b | |
| set -g prefix C-Space | |
| bind C-Space send-prefix | |
| # Vim style pane selection | |
| bind h select-pane -L | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind l select-pane -R | |
| # Start windows and panes at 1, not 0 | |
| 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 | |
| # Use Alt-arrow keys without prefix key to switch panes | |
| bind -n M-Left select-pane -L | |
| bind -n M-Right select-pane -R | |
| bind -n M-Up select-pane -U | |
| bind -n M-Down select-pane -D | |
| # Shift arrow to switch windows | |
| bind -n S-Left previous-window | |
| bind -n S-Right next-window | |
| # Shift Alt vim keys to switch windows | |
| bind -n M-H previous-window | |
| bind -n M-L next-window | |
| set -g @plugin 'tmux-plugins/tpm' | |
| set -g @plugin 'tmux-plugins/tmux-sensible' | |
| set -g @plugin 'tmux-plugins/tmux-pain-control' | |
| set -g @plugin 'tmux-plugins/tmux-yank' | |
| set -g @plugin 'tmux-plugins/tmux-prefix-highlight' | |
| set -g @plugin 'christoomey/vim-tmux-navigator' | |
| set -g @plugin 'dracula/tmux' | |
| # available plugins: battery, cpu-usage, gpu-usage, ram-usage, network, network-bandwith, weather, time | |
| set -g @dracula-plugins "cwd battery network" | |
| set -g @dracula-show-powerline true | |
| set -g @dracula-transparent-powerline-bg true | |
| set -g @dracula-show-left-icon "#H \ue0b9 #S" | |
| set -g @dracula-left-icon-padding 0 | |
| set -g @dracula-show-left-sep "\ue0b8" | |
| set -g @dracula-show-right-sep "\ue0ba" | |
| set -g @dracula-inverse-divider "\ue0be" | |
| # configure tmux-prefix-highlight | |
| set -g @prefix_highlight_prefix_prompt 'Wait' | |
| set -g @prefix_highlight_copy_prompt 'Copy' | |
| set -g @prefix_highlight_sync_prompt 'Sync' | |
| set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M' | |
| # install tpm if it's not already installed | |
| if "test ! -d ~/.tmux/plugins/tpm" \ | |
| "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" | |
| # run tpm | |
| run '~/.tmux/plugins/tpm/tpm' | |
| # set vi-mode | |
| set-window-option -g mode-keys vi | |
| # keybindings | |
| 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 | |
| bind '"' split-window -v -c "#{pane_current_path}" | |
| bind % split-window -h -c "#{pane_current_path}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment