Skip to content

Instantly share code, notes, and snippets.

@anistark
Last active July 8, 2018 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anistark/1f686bab54e93d1941f9 to your computer and use it in GitHub Desktop.
Save anistark/1f686bab54e93d1941f9 to your computer and use it in GitHub Desktop.
Tmux Conf
# Tmux Config
tm() { tmux new -s "$1" ;}
ta() { tmux attach -t "$1"; }
tl() { tmux list-sessions; }
Setting up tmux directly
```
wget -O ~/.tmux.conf https://gist.githubusercontent.com/anistark/1f686bab54e93d1941f9/raw/8962c23f8d897510cce6b9f722a720d53210dcf7/tmux.conf
```
set-window-option -g xterm-keys on
# Change key-bindings for moving control between 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
# Alt-n for new window
bind -n M-n new-window
# Alt-r for renaming window
bind -n M-r command-prompt "rename-window %%"
# Ctrl-tab Switching between windows
bind-key C-T last-window
# Use window switching using Shift + Left / Right arrow
bind -n S-left prev
bind -n S-right next
# Swap window with left/right
bind -n S-Up swap-window -t -1
bind -n S-Down swap-window -t +1
# Enable pane-switching using mouse
# set-option -g mouse-select-pane on
# set-option -g mouse on
# Monitor events happening on other windows
setw -g monitor-activity on
set -g visual-activity on
# Start window numbering from 1 instead of 0
set -g base-index 1
# Agressive resize
setw -g aggressive-resize on
# Change the default coloring and display
set -g status-bg black
set -g status-fg white
set-window-option -g window-status-current-bg red
set -g status-left ""
set -g status-right '#[fg=green,bold]#S:#H #[fg=white,bold]#(cut -d " " -f 1-2 /proc/loadavg)#[default] #[fg=cyan,bold]%Y-%m-%d#[default]'
# Sane scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment