Skip to content

Instantly share code, notes, and snippets.

@kondor6c
Last active September 30, 2017 16:03
Show Gist options
  • Select an option

  • Save kondor6c/f6074f82b12db4b0d964bf1910b27795 to your computer and use it in GitHub Desktop.

Select an option

Save kondor6c/f6074f82b12db4b0d964bf1910b27795 to your computer and use it in GitHub Desktop.
# Screen/Tmux commands:
# | default | Function | Tmux |
# |----------|:------------------------------------:| -----------------------:|
# | ^A " | window list, where am I | ^b s |
# | ^A A | Rename | ^b , |
# | ^A c | create | ^b n |
# | ^A k | kill | ^b & |
# | ^A d | detach | ^b D |
# | ^A space | next window | ^b n |
# | ^A p | previous window | ^b p |
# | ^A | | Spilt vertical | ^b % |
# | ^A S | Spilt horizontal | ^b " |
# | ^A tab | change region focus | ^b arrows |
# | ^A X | Kill current region/focus | ^b x |
# | ^A ^A | switch to previous screen (toggle) | ^b |
# | ^A [0-9] | go to window [0-9] | ^b [0-9] |
# | ^A esc | for scrollback | ^b page up |
# | ^A [ | copy mode | ^b [ |
# | ^A ] | paste | p (vim) C-y (emacs) |
# | | monitor for "string" (append) | setw -g monitor-content |
# | | monitor silience (append interval) | setw -g monitor-silence |
# | ^A _ | silence activity monitor (off) | set -g visual-activity |
# | ^A M | start activity monitor (on) | set -g visual-activity |
# | | Synchronize keystrokes between panes | setw synchronize-panes |
#
vbell off #I hate it so much.
autodetach on
startup_message off
# Tmux-ness
altscreen on #keep scrollback after vim/nano/emacs
multiuser on #allow others to join the session, like tmux
monitor on #set's activity monitor
hardstatus alwayslastline #bottom status bar
escape ^za #set to ctrl z I have never pratically used suspendin
screen -t root 0 sudo su -
screen -t bash 1
screen -t bash 2
screen -t home 3 ssh me
hardstatus string '%{gk}[%{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= w}%?%+Lw%?%? %{g}]%{W}
# TMUX
# | Screen | Function | default |
# |----------|:------------------------------------:| -----------------------:|
# | ^A " | window list, where am I | ^b s |
# | ^A A | Rename | ^b , |
# | ^A c | create | ^b n |
# | ^A k | kill | ^b & |
# | ^A d | detach | ^b D |
# | ^A space | next window | ^b n |
# | ^A p | previous window | ^b p |
# | ^A | | Spilt vertical | ^b % |
# | ^A S | Spilt horizontal | ^b " |
# | ^A tab | change region focus | ^b arrows |
# | ^A X | Kill current region/focus | ^b x |
# | ^A ^A | switch to previous screen (toggle) | ^b |
# | ^A [0-9] | go to window [0-9] | ^b [0-9] |
# | ^A esc | for scrollback | ^b page up |
# | ^A [ | copy mode | ^b [ |
# | ^A ] | paste | p (vim) C-y (emacs) |
# | | monitor for "string" (append) | setw -g monitor-content |
# | | monitor silience (append interval) | setw -g monitor-silence |
# | ^A _ | silence activity monitor (off) | set -g visual-activity |
# | ^A M | start activity monitor (on) | set -g visual-activity |
# | | Synchronize keystrokes between panes | setw synchronize-panes |
# Behavior
set -g history-limit 3000
#should increase VIM response time
set -sg escape-time 1
setw -g mode-keys vi
set -g default-terminal "screen-256color"
setw -g monitor-activity on
set -g visual-activity on
bind r source-file ~/.tmux.conf \; display-message "Config reloaded."
#set titles in X to reflect what is going on in the tmux window
set -g set-titles on
set -g set-titles-string "#T"
# Automatically set window title
setw -g automatic-rename
#i URXVT tab like window switching (-n: no prior escape seq) "See .Xdefaults !
#bind -n S-down new-window
#bind -n S-left prev
#bind -n S-right next
#bind -n C-left swap-window -t -1
#bind -n C-right swap-window -t +1
new -s Primary -n root 'sudo su -'
neww -n psql 'sudo su postgres -c psql'
neww -n ipython ipython
neww -n other bash
neww -n bash bash
# Views
#------
# color pallete: magenta, cyan, red, green, blue, yellow, cyan
# These options should turn red when activity occurs (s/activity/bell/)
# set-option -gw window-status-activity-attr bold
set-option -gw window-status-activity-bg black
set-option -gw window-status-activity-fg magenta
set-option -gw window-status-bell-fg red
set-option -gw window-status-bell-attr bold
set-option -gw window-status-bell-bg black
# Kevin's color codes for tmux
# yellow = J "usually for personal configured remote connections
# cyan = space "usually for local connections, might be used with URXVT
# green = default 'b' "usually for unconfigured _default_ server connections
unbind C-b
#set -g prefix C-j
#set -g status-bg yellow
set -g prefix C-space
set -g status-bg cyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment