Skip to content

Instantly share code, notes, and snippets.

@kennedyoliveira
Last active February 4, 2024 21:07
Show Gist options
  • Save kennedyoliveira/6d97611b5112f1e87e8e1306654a3e24 to your computer and use it in GitHub Desktop.
Save kennedyoliveira/6d97611b5112f1e87e8e1306654a3e24 to your computer and use it in GitHub Desktop.
My Tmux custom configuration
# Before anything tpm needs to be installed, install with this command:
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# After the tmp is installed reload tmux with ctrl + R or tmux source ~/.tmux.conf
# Then install the plugins via Ctrl + Shift + S
# install navi widget
bind-key -T prefix C-g split-window "$SHELL --login -i -c 'navi --print | head -n 1 | tmux load-buffer -b tmp - ; tmux paste-buffer -p -t {last} -b tmp -d'"
# allow mouse scroll
set-option -g mouse on
# act like vim
setw -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# allow selecting files or urls from the tmux pane and opening it
# prefix + f
# Dependencies
# - fpp
# https://github.com/tmux-plugins/tmux-fpp?tab=readme-ov-file
# brew install fpp
# It uses the editor from the environment variable $EDITOR, so set it to nvim for better results
# export EDITOR=vim
set -g @plugin 'tmux-plugins/tmux-fpp'
# https://github.com/tmux-plugins/tmux-logging
# Allow to capture the pane history and saving it to a file
# also capture the pane as a screen shot
# prefix + alt + c => clear pane history
# prefix + shift + p => start logging
# prefix + alt + p => "screenshot" the pane
set -g @plugin 'tmux-plugins/tmux-logging'
# https://github.com/jaclu/tmux-power-zoom
# open the zoomed panel in it's own windows, return to the
# original position
# prefix + shift + z
set -g @plugin 'jaclu/tmux-power-zoom'
# https://github.com/christoomey/vim-tmux-navigator
# allow navigating between nvim and tmux panes
# uses the same mapping as nvim, ctrl + h/j/k/l, in the tmux pane
# there is no need to use the prefix
# will likely have issue with NVChad default config, solution => https://github.com/christoomey/vim-tmux-navigator/issues/356#issuecomment-1631726543
set -g @plugin 'christoomey/vim-tmux-navigator'
# https://draculatheme.com/tmux
set -g @plugin 'dracula/tmux'
# dracula plugin configurations
set -g @dracula-show-fahrenheit false
set -g @dracula-show-powerline true
set -g @dracula-show-flags true
set -g @dracula-plugins "battery cpu-usage time"
set -g @dracula-show-left-icon session
set -g @dracula-show-timezone false
set -g @dracula-time-format "%a, %b %d %R"
set -g @dracula-show-location false
set -g @dracula-weather-colors "light_purple"
set -g status-position top
# Automatic save and restore of tmux environment
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# This must be at the bottom of the configuration file
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment