Created
November 19, 2021 10:52
-
-
Save MvRens/f1e809773b8fa160d86afe015fb78735 to your computer and use it in GitHub Desktop.
TMux configuration
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
# start a new session if none exist | |
new-session | |
# make tmux display things in 256 colors | |
set -g default-terminal "screen-256color" | |
# set scrollback history to 10000 (10k) | |
set -g history-limit 10000 | |
# set Ctrl-a as the default prefix key combination | |
# and unbind C-b to free it up | |
set -g prefix C-a | |
unbind C-b | |
# use send-prefix to pass C-a through to application | |
bind C-a send-prefix | |
# reload ~/.tmux.conf using PREFIX r | |
bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
# use PREFIX | to split window horizontally and PREFIX - to split vertically | |
bind | split-window -h | |
bind - split-window -v | |
# Make the current window the first window | |
bind T swap-window -t 1 | |
# map Vi movement keys as pane movement keys | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# and use C-h and C-l to cycle thru panes | |
bind -r C-h select-window -t :- | |
bind -r C-l select-window -t :+ | |
# resize panes using PREFIX H, J, K, L | |
bind H resize-pane -L 5 | |
bind J resize-pane -D 5 | |
bind K resize-pane -U 5 | |
bind L resize-pane -R 5 | |
set -g mouse off | |
# ---------------------- | |
# Status Bar | |
# ----------------------- | |
set-option -g status on # turn the status bar on | |
set -g status-interval 5 # set update frequencey (default 15 seconds) | |
set -g status-justify left # center window list for clarity | |
# set-option -g status-position top # position the status bar at top of screen | |
# visual notification of activity in other windows | |
#setw -g monitor-activity on | |
#set -g visual-activity on | |
setw -g window-status-current-format "#[fg=black,bold]#[bg=brightgreen] #I:[#W] " | |
#setw -g window-status-content-attr bold | |
set -g status-bg black | |
set -g status-fg white | |
set -g status-style bold | |
# show host name | |
set -g status-left-length 250 | |
set -g status-left "#[bg=black]#[fg=yellow]#S @ #h :: " | |
# show date and time on right | |
set -g status-right-length 60 | |
set -g status-right "#[bg=black]#[fg=yellow]%d %b %Y #[fg=brightgreen]:: #(date | awk '{print $4}')::" | |
# Start windows and panes at 1, not 0 | |
set -g base-index 1 | |
set -g pane-base-index 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment