Skip to content

Instantly share code, notes, and snippets.

@podjackel
Last active November 12, 2021 14:12
Show Gist options
  • Save podjackel/68511a756cbb70bd54ffee2761faef1f to your computer and use it in GitHub Desktop.
Save podjackel/68511a756cbb70bd54ffee2761faef1f to your computer and use it in GitHub Desktop.
##Custom TMUX settings
# 0 is too far from ` ;)
set -g base-index 1
#Set colors to work
set -g default-terminal "screen-256color"
#Remap Prefix to screens
set -g prefix C-a
bind C-a send-prefix
#Quality of Life stuff
set -g history-limit 10000000
set -g allow-rename off
bind-key R command-prompt -p "Rename Window:" "rename-window '%%'"
#Pane/Windows Moving
##Grabs the pane from the target window and joins it to the current
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
##Send Window to Pane:
bind-key s command-prompt -p "Send pane to Window:" "break-pane -t '%%'"
#set the search mode VI
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'Y' send -X copy-selection-and-cancel
bind -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# 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
# Horizontal and Vertical Splits
bind \\ split-window -h
bind - split-window -v
unbind '"'
unbind %
# Reload tmux config
bind r source-file ~/.tmux.conf
## (prefix)+alt+shift+P lets to save backscroll to log file
#git clone https://github.com/tmux-plugins/tmux-logging /opt/tmux-logging
run-shell /opt/tmux-logging/logging.tmux
# THEME
set -g status-bg black
set -g status-fg white
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=green](#S) #(whoami) '
set -g status-right '#[fg=colour1,bold]#{pane_pid} #[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'
set-option -g renumber-windows on
#use mouse wheel as copy mode
set -g mouse on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment