Skip to content

Instantly share code, notes, and snippets.

@jsvazic
Last active March 10, 2022 15:27
Show Gist options
  • Save jsvazic/199fdf8819fb6fe6a4ea1ad7fdfb21dc to your computer and use it in GitHub Desktop.
Save jsvazic/199fdf8819fb6fe6a4ea1ad7fdfb21dc to your computer and use it in GitHub Desktop.
My .tmux.conf file
# Set prefix to Ctrl-a
set-option -g prefix C-a
unbind C-a
bind-key C-a send-prefix
# Use Alt-arrow keys 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
# Use Shift-arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# vi mode
set-window-option -g mode-keys vi
# Mouse mode
set -g mouse on
# Set easier window split keys
bind-key v split-window -h -c "#{pane_current_path}"
bind-key h split-window -v -c "#{pane_current_path}"
bind-key c new-window -c "#{pane_current_path}"
# Easier config reload
bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# Lots of history
set-option -g history-limit 10000
# Status bar settings
set-option -g status on
set-option -g status-interval 2
set-option -g status-right-length 50
set -g status-right "#([ -d /proc/sys/net/ipv4/conf/tun0 ] && echo \"$({ ip -4 -br a sh dev tun0 | awk {'print $3'} | cut -f1 -d/; } 2>/dev/null) 🬄 \")#{pane_width}x#{pane_height} 🬄 %a %Y-%m-%d %H:%M"
@jsvazic
Copy link
Author

jsvazic commented Mar 10, 2022

Updated the status bar to include some separators as well as the IP for a tun0 interface, i.e. VPN for TryHackMe, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment