Last active
September 4, 2021 11:50
-
-
Save nik-garg/cd128360d137e173c66cac97949d76bc to your computer and use it in GitHub Desktop.
Tmux config
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
# Improve colors | |
set -g default-terminal "tmux-256color" | |
set -ag terminal-overrides ",xterm-256color:RGB" | |
# Set scrollback buffer to 10000 | |
set -g history-limit 10000 | |
# Customize the status line | |
set -g status-fg green | |
set -g status-bg black | |
set -g mouse on | |
# No delay for escape key press | |
set -sg escape-time 0 | |
# set first window to index 1 (not 0) to map more to the keyboard layout | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
# re-number windows when one is closed | |
set -g renumber-windows on | |
# Prefix | |
unbind C-b | |
set -g prefix ` | |
bind ` send-prefix | |
# New window | |
unbind '"' | |
unbind % | |
unbind n | |
bind s split-window -c "#{pane_current_path}" | |
bind v split-window -h -c "#{pane_current_path}" | |
bind n new-window -c "#{pane_current_path}" | |
# Easy Config Reloads | |
bind r source-file ~/.tmux.conf | |
# Direction | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# Ctrl - w or w to kill panes | |
unbind w | |
bind-key w kill-pane | |
# C + control q to kill session | |
unbind q | |
bind-key q kill-session | |
# Vim selection: | |
unbind [ | |
bind Escape copy-mode | |
unbind p | |
bind p paste-buffer | |
bind-key -Tcopy-mode-vi 'v' send -X begin-selection | |
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe "~/dotfiles/utils/copy" | |
# Shift arrow to switch windows | |
bind -n S-Left previous-window | |
bind -n S-Right next-window | |
# Shift ctrl arrow to move windows | |
bind -n S-C-Left swap-window -t -1 | |
bind -n S-C-Right swap-window -t +1 | |
setw -g mode-keys vi | |
# TPM Plugins | |
# set -g @plugin "arcticicestudio/nord-tmux" | |
set -g @plugin 'dracula/tmux' | |
# available plugins: battery, cpu-usage, gpu-usage, ram-usage, network, network-bandwith, weather, time | |
set -g @dracula-plugins "cpu-usage ram-usage" | |
set -g @dracula-show-powerline false | |
# it can accept `session`, `smiley`, `window`, or any character. | |
set -g @dracula-show-left-icon window | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run -b '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment