Skip to content

Instantly share code, notes, and snippets.

@adamsardar
Created November 2, 2020 14:59
Show Gist options
  • Save adamsardar/6d7a89e33f098d0cc913ebec093b9cff to your computer and use it in GitHub Desktop.
Save adamsardar/6d7a89e33f098d0cc913ebec093b9cff to your computer and use it in GitHub Desktop.
#Set command prefix to be like screen
set -g prefix C-a
unbind C-b
bind C-a send-prefix
#Set up the status bar
set -g status-right '#[fg=green][#[fg=blue]%Y-%m-%d #[fg=yellow]%H:%M#[default]#[fg=green]]'
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#(echo `whoami`)#[fg=white]@#[fg=magenta]#H'
set-window-option -g window-status-current-bg green
set-window-option -g window-status-current-fg white
#set-window-option -g window-status-current-format '#[bg=blue,fg=cyan,bold]#I#[bg=blue,fg=cyan]:#[fg=white]#W#[fg=dim]#F'
#Set up mnemonic split keys
unbind %
bind | split-window -h
bind - split-window -v
#Setup activity monitoring
set-option -g lock-after-time 1800
setw -g monitor-activity on
set -g visual-activity on
#set-window-option -g window-status-alert-bg red
#set-window-option -g window-status-alert-fg yellow
#Quirky shortcuts
#man in new pane
unbind ?
bind-key ? command-prompt "split-window -h 'exec man %%'"
#ssh to host
bind-key S command-prompt "new-window -n %1 'ssh %1'"
# use UTF8
set -g default-terminal "screen-256color" # Use 256 colors
set -g status-utf8 on # Enable utf-8
set -g history-limit 100000 # Scrollback buffer number of lines
set -g utf8 on
run-shell ~/Programs/tmux-resurrect/resurrect.tmux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment