Last active
February 21, 2021 00:21
-
-
Save 0xZDH/99910007398aa18aa4e0a91b6be238c2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Remove the escape key delay | |
# This should help speed up vim interactions | |
set -sg escape-time 0 | |
# Set default history size | |
set -g history-limit 100000 | |
# Easily reload the tmux config | |
bind-key r source-file ~/.tmux.conf \; display ".tmux.conf reloaded!" | |
# Set tmux display to 256 colors | |
set -g default-terminal "screen-256color" | |
# Enable windows renumbering | |
set-option -g renumber-windows on | |
# Use `|` and `-` to split panes | |
bind | split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % | |
# Use Shift-arrow to switch panes | |
# Uncomment when needed, for now use Shift-arrow for windows | |
# bind -n S-Left select-pane -L | |
# bind -n S-Right select-pane -R | |
# bind -n S-Up select-pane -U | |
# bind -n S-Down select-pane -D | |
# Use Shift-arrow to switch windows | |
bind -n S-Left previous-window | |
bind -n S-Right next-window | |
# Disable auto window renaming | |
set-option -g allow-rename off | |
# Use 'Esc' for copy-mode | |
unbind [ | |
bind Escape copy-mode | |
# Status bar setting | |
# set -g status-interval 5 # Set update frequencey (default 15 seconds) | |
set-option -g status on # Enable status bar | |
set -g status-justify centre # Center window list | |
# Sctivity notifications | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# Status bar colors | |
set-option -g status-bg black #colour235 #base02 | |
set-option -g status-fg brightyellow #yellow | |
# -- Display the VPN IP addr on the left side of the status bar | |
# | |
set -g status-left-length 50 | |
# Set the VPN addr to grab the public address | |
# set -g status-left "#[fg=blue]VPN: #[fg=brightgreen]#(curl -s -k https://canihazip.com/s)" | |
# Set the VPN addr to use `ipsec status` | |
# set -g status-left "#[fg=brightcyan]VPN: #[fg=brightgreen]#(ipsec status | grep ESTABLISHED | grep -Po '\\[.+?\\]' | tail -1 | tr -d '[]' 2> /dev/null)" | |
# Set the VPN addr to use `ip addr` via tun0 | |
# set -g status-left "#[fg=blue]VPN: #[fg=brightgreen]#(ip addr show tun0 | grep inet[^6] | awk '{print $2}' 2> /dev/null)" | |
# Set the VPN addr to use `ip addr` via cscotun0 | |
# set -g status-left "#[fg=blue]VPN: #[fg=brightgreen]#(ip addr show cscotun0 | grep inet[^6] | awk '{print $2}' 2> /dev/null)" | |
# Set the VPN addr to use `utun2` | |
# set -g status-left "#[fg=brightcyan]VPN: #[fg=brightgreen]#(ifconfig utun2 | grep inet[^6] | awk '{print $2}' 2> /dev/null)" | |
# | |
# -- | |
# Show: | |
# session name (#S) | |
# window & pane number(#I:#P) | |
# date and time | |
set -g status-right-length 60 | |
set -g status-right '#[fg=brightcyan]#S #I:#P #[fg=brightgreen]%a %b%e %H:%M:%S' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment