Skip to content

Instantly share code, notes, and snippets.

@NerOcrO
Last active August 11, 2019 12:38
Show Gist options
  • Save NerOcrO/5990307 to your computer and use it in GitHub Desktop.
Save NerOcrO/5990307 to your computer and use it in GitHub Desktop.
tmux
# vim ~/.tmux.conf
# tmux source-file ~/.tmux.conf
# tmux attach -d -t SESSION_ID
# Cheat sheet tmux : https://gist.github.com/MohamedAlaa/2961058
# Mouse active
# Use shift+mouse to copy text
set -g mouse on
setw -g mode-keys vi
# Use ctrl+arrow
setw -g xterm-keys on
# Status bar background (default green)
set -g status-bg black
# Status barr foreground (default black)
set -g status-fg yellow
# Status barr centre (default left)
set -g status-justify centre
# Interval 1 second (refresh)
set -g status-interval 1
# Set status line foreground colour for the currently active window
setw -g window-status-current-fg green
# Set status line background colour for a single window
setw -g window-status-fg white
# Panes
set -g pane-border-fg red
# Active pane
set -g pane-active-border-fg green
# Left part of the status bar
set -g status-left "[ #[fg=green]#H : #(who | grep \" \" -c) user#[default] ]"
# Right part of the status bar
set -g status-right "] [ #[fg=cyan]Mem: #(awk '/MemFree/ { printf \"%.3f Go\", $2/1024/1024 }' /proc/meminfo)/#(awk '/MemTotal/ { printf \"%.3f Go\", $2/1024/1024 }' /proc/meminfo)#[default] ][ #[fg=magenta]Loadavg: #(cat /proc/loadavg | cut -d \" \" -f 1)#[default] ][ #[fg=white]%a %d-%m-%Y %H:%M:%S #[default]]"
set -g status-right-length 90
# Scroll History
set -g history-limit 30000
# List of plugins
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment