Last active
September 29, 2023 19:18
-
-
Save apzentral/11087412784c05a070e232510fb5476b to your computer and use it in GitHub Desktop.
TMUX basic config using A instead of B
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
# remap prefix to Control + a | |
set -g prefix C-a | |
# bind 'C-a C-a' to type 'C-a' | |
bind C-a send-prefix | |
unbind C-b | |
# split panes using | and - | |
bind | split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % | |
# reload config file | |
bind r source-file ~/.tmux.conf | |
# Enable mouse control (clickable windows, panes, resizable panes) | |
# set -g mouse-select-window on | |
# set -g mouse-select-pane on | |
# set -g mouse-resize-pane on | |
# Enable mouse mode (tmux 2.1 and above) | |
set -g mouse on | |
# setw -g mouse on | |
set -g default-terminal "screen-256color" | |
# word separators for automatic word selection | |
setw -g word-separators ' @"=()[]' | |
setw -ag word-separators "'" | |
# Start counting pane and window number at 1 | |
set -g base-index 1 | |
setw -g pane-base-index 1 | |
# Disable automatic renaming | |
set-option -wg automatic-rename off | |
# Copy text from tmux | |
# sudo apt-get install xclip -y | |
# Use xclip to copy and paste with the system clipboard | |
bind C-c run "tmux save-buffer - | xclip -i -sel clip" | |
bind C-v run "tmux set-buffer $(xclip -o -sel clip); tmux paste-buffer" | |
# Show more line | |
set-option -g history-limit 5000 | |
# UTF-8 (tmux < 2.2) | |
set -q -g status-utf8 on | |
setw -q -g utf8 on | |
# Move window automatically | |
set -g renumber-windows on | |
# Keep current path | |
bind c new-window -c "#{pane_current_path}" | |
# TPM | |
# Installing TPM | |
# https://github.com/tmux-plugins/tpm#installation | |
set -g @plugin 'tmux-plugins/tpm' | |
###################### | |
### Plugins ### | |
###################### | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'dracula/tmux' | |
run '~/.tmux/plugins/tpm/tpm' | |
###################### | |
### DESIGN CHANGES ### | |
###################### | |
# Color: | |
# https://superuser.com/questions/285381/how-does-the-tmux-color-palette-work | |
# loud or quiet? | |
set -g visual-activity off | |
set -g visual-bell off | |
set -g visual-silence off | |
setw -g monitor-activity off | |
set -g bell-action none | |
# modes | |
setw -g clock-mode-colour colour5 | |
setw -g mode-style 'fg=colour1 bg=colour18 bold' | |
# panes | |
set -g pane-border-style 'fg=colour19 bg=colour0' | |
set -g pane-active-border-style 'bg=colour0 fg=colour9' | |
# statusbar | |
set -g status-position bottom | |
set -g status-justify left | |
set -g status-style 'bg=colour18 fg=colour137 dim' | |
set -g status-left '' | |
set -g status-right '#[fg=colour7,bg=colour19] %d/%m #[fg=colour238,bg=colour8] %H:%M:%S ' | |
set -g status-right-length 50 | |
set -g status-left-length 20 | |
setw -g window-status-current-style 'fg=colour1 bg=colour19 bold' | |
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F ' | |
setw -g window-status-style 'fg=colour9 bg=colour18' | |
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' | |
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold' | |
# messages | |
set -g message-style 'fg=colour252 bg=colour16 bold' | |
###################### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment