Skip to content

Instantly share code, notes, and snippets.

@a3ammar
Created November 30, 2017 07:02
Show Gist options
  • Save a3ammar/447b979a1235955affb023aa0f3370ed to your computer and use it in GitHub Desktop.
Save a3ammar/447b979a1235955affb023aa0f3370ed to your computer and use it in GitHub Desktop.
tmux.conf
### General Options
# there's a known bug with pbcopy,pbpaste not working with tmux, the next line
# wraps tmux in a wrapper to make them work. See:
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
set -g default-command "reattach-to-user-namespace -l zsh"
set -g history-limit 7000
set -s default-terminal "xterm-256color"
setw -g mode-keys emacs
set -g status-keys emacs
set -g repeat-time 250
set -g xterm-keys on
set -s escape-time 0 # fix vim escape delay
### Status Bar
set -g status-bg default
set -g status-fg colour202
set -g status-justify centre
set -g status-left "#[fg=colour223]#(whoami)#[fg=colour136]@#[fg=colour223]#(hostname -s)#[fg=colour136] ["
set -g status-right "#[fg=colour136]] #[fg=colour223]#(sysctl vm.loadavg | grep --color=NEVER -Eo '([0-9]\.[0-9]{1,2} ?){3}')"
### Message Bar
set -g message-bg white
### Window options
setw -g window-status-current-attr underscore
setw -g window-status-current-bg default
setw -g window-status-current-fg colour214
### Keybindings
## Prefix command
set -g prefix C-z
bind z send-prefix
## Unbind keys
unbind C-o
unbind C-b
unbind C-z
## Make most of the command more emacs-y
bind C-c new-window -a # `-a` to insert instead of append after the last.
bind C-k kill-window
bind x kill-pane -a
bind C-x kill-pane -a
bind C-space copy-mode
bind -T copy-mode M-w send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind C-y paste-buffer
bind C-c new-window
bind C-d detach-client
bind -r C-p next-window
bind -r C-n previous-window
bind -r M-p resize-pane -U
bind -r M-n resize-pane -D
bind -r M-f resize-pane -R
bind -r M-b resize-pane -L
bind C-o selectp -l
bind o selectp -l
bind C-u rotate-window
bind u rotate-window
bind C-\ confirm-before kill-server
bind q copy-mode # To quit the copy-mode
bind '"' split-window -v -c "#{pane_current_path}"
### Startup windows
new -n "Work"
new-window -n "Process"
new-window -n "Other"
selectw -t 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment