Last active
September 9, 2023 21:33
-
-
Save SpandanBG/9563353a7d96eff8723a2a8a2ab7045b to your computer and use it in GitHub Desktop.
This file contains 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
#################### | |
# Configs | |
#################### | |
# Set <C-a> as prefix | |
set -g prefix C-Space | |
# Set mouse scroll ON | |
set -g mouse on | |
# Increase scroll-back history | |
set -g history-limit 5000 | |
# Decrease command delay (increase vim responsiveness) | |
set -sg escape-time 1 | |
# Highlight window when it has new activitiy | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# Re-number windows when one is closed | |
set -g renumber-windows on | |
# Increase repeat time for repeatabe commands | |
set -g repeat-time 1000 | |
# Set 256 color tmux color | |
set -g default-terminal "xterm-256color" | |
set -ga terminal-overrides ",*256col*:Tc" | |
#################### | |
# Key bindings | |
#################### | |
# Pane resize in all four direction using vi bindings | |
# shift-ctrl-<h,j,k,l> | |
# FIXME This is not working | |
bind -r H resize-pane -L 2 | |
bind -r J resize-pane -D 2 | |
bind -r K resize-pane -U 2 | |
bind -r L resize-pane -R 2 | |
# Open panels and windows on the same directory | |
bind '"' split-window -c "#{pane_current_path}" | |
bind % split-window -h -c "#{pane_current_path}" | |
bind c new-window -c "#{pane_current_path}" | |
# Copy to clipboard for windows | |
# Hold shift while selecting with mouse | |
# Press `Alt+w` twice to copy (first copies to tmux buffer, then to clipboard) | |
# bind -n -M-w run -b "tmux show-buffer | clip.exe" | |
#################### | |
# Status bar | |
#################### | |
# Set refresh interval for status bar | |
set -g status-interval 30 | |
# Center the status bar | |
set -g status-justify centre | |
#################### | |
# Plugins | |
#################### | |
# Plugin manager | |
set -g @plugin 'tmux-plugins/tpm' | |
# Plugin for usefull configs | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
# Plugin to save sessions across reboots | |
# prefix + <C-s> to save session | |
# prefix + <C-r> to restore saved session | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
# Plugin to continuously save session and restore | |
# when first start | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
set -g @continuum-restore 'on' | |
# Plugin for Dracula theme | |
set -g @plugin 'dracula/tmux' | |
# Plugin for Nord theme | |
# set -g @plugin "arcticicestudio/nord-tmux" | |
# Plugin Fuzzy Finder (Window & Sessions) | |
set -g @plugin 'sainnhe/tmux-fzf' | |
TMUX_FZF_ORDER="window|session|pane|command|keybinding|clipboard|process" | |
TMUX_FZF_LAUNCH_KEY="f" | |
# Start tmux plugin manager (TPM) | |
run '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install Tmux Plugin Manager (TPM) as such:
$ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm