Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Last active January 20, 2024 21:56
Show Gist options
  • Save diegopacheco/d57a4840e24c39a93809f427cf5ef3e4 to your computer and use it in GitHub Desktop.
Save diegopacheco/d57a4840e24c39a93809f427cf5ef3e4 to your computer and use it in GitHub Desktop.
tmux conf
unbind r
bind r source-file ~/.tmux.conf
#
# List of plugins
#
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'dracula/tmux'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
#set -g @plugin 'xamut/tmux-weather'
#
# set terminal for 256 colors
#
set -s default-terminal 'tmux-256color'
#
# set prefix to CTRL + S and enable mouse.
#
set -g prefix C-s
set -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
bind-key : command-prompt
bind-key [ next-window
bind-key ] previous-window
#
# New session opens with current path
#
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
#
# Dracula Theme configs
#
set -g @dracula-show-powerline true
set -g @dracula-location "Porto Alegre"
set -g @dracula-show-flags true
set -g @dracula-cpu-display-load false
set -g @dracula-show-left-icon hostname
set -g status-position bottom
set -g @dracula-show-timezone true
set -g @dracula-time-format "%R %F %Z"
set -g @dracula-show-location true
set -g @dracula-plugins "git cpu-usage ram-usage network-ping weather time"
set -g @dracula-ping-server "google.com"
set -g @dracula-ping-rate 5
#
# Save and restore tmux session every 15min
#
set -g @continuum-restore 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
#
# ctrl + alt + l clear the screen on console
#
bind -n C-M-l "send-keys C-l"
#
# ctrl + alt + f open fzf vim alias
# alias ffind2= $(fzf --preview 'bat --color=always --style=header,grid --line-range :300 {}')
#
bind -n C-M-r send-keys 'ffind2' Enter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment