Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Tmux #9

Merged
merged 5 commits into from

2 participants

@wm
Owner
wm commented

Add's some tmux customization

  • Adds some more bindings for tmux
  • adds tmuxinator config
  • sets TMPDIR to /tmp (screw you Mac OSX security measures)
@jgn
Owner

:octocat:

I wonder if pull requests for dotfiles should come from branches instead of forks? (To make it easier to switch to the branch? -- which is somewhat problematic for dotfiles.)

@wm
Owner
wm commented

Yes, I will push branches to Iora from now on.

@wm wm merged commit 75d41cc into IoraHealth:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 26, 2012
  1. @wm

    Make tmux more awesome

    wm authored
  2. @wm

    Style the status bar

    wm authored
  3. @wm

    Add tmuxinator

    wm authored
  4. @wm

    add system copy/paste

    wm authored
  5. @wm

    Add custom tmpdir

    wm authored
This page is out of date. Refresh to see the latest.
Showing with 52 additions and 1 deletion.
  1. +48 −1 tmux.conf
  2. +2 −0  zsh/tmuxinator.zsh
  3. +2 −0  zshrc
View
49 tmux.conf
@@ -1,6 +1,7 @@
# act like vim
set-option status-keys vi
setw -g mode-keys vi
+
# enable UTF8 for this session (set-option)
# set-option utf8 on
@@ -12,6 +13,12 @@ bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
+# use vim-ish bindings for resizing panes
+bind -r H resize-pane -L 5
+bind -r J resize-pane -D 5
+bind -r K resize-pane -U 5
+bind -r L resize-pane -R 5
+
# Default bindings:
# C-b Send the prefix key (C-b) through to the application.
# C-o Rotate the panes in the current window forwards.
@@ -71,6 +78,9 @@ bind-key -r C-l select-window -t :+
unbind C-b
set -g prefix C-a
+# to pass C-a through to program running in tmux just do it twice
+bind C-a send-prefix
+
# look good
set -g default-terminal "screen-256color"
@@ -78,5 +88,42 @@ set -g default-terminal "screen-256color"
set -g status-bg black
set -g status-fg white
set -g status-interval 1
-set -g status-left ' '
+set -g status-left-length 40
set -g status-right '#[fg=yellow]%Y-%m-%d %H:%M#[default] '
+set -g status-left "#[fg=green]#S #[fg=yellow]#I #[fg=cyan]#P"
+set -g status-utf8 on
+set -g status-justify centre
+setw -g monitor-activity on
+set -g visual-activity on
+
+# style the active window
+setw -g window-status-current-fg yellow
+setw -g window-status-current-bg black
+setw -g window-status-current-attr bright
+
+# Set the window and pane index to 1 instead of 0
+set -g base-index 1
+setw -g pane-base-index 1
+
+# Set the pane divider colors
+set -g pane-border-fg green
+set -g pane-border-bg black
+set -g pane-active-border-fg white
+set -g pane-active-border-bg yellow
+
+# reload this file
+bind r source-file ~/.tmux.conf \; display "Reloaded!"
+
+# split panes
+bind | split-window -h
+bind - split-window -v
+
+# copy and paste (command mode)
+unbind [
+bind Escape copy-mode
+bind p paste-buffer
+bind -t vi-copy 'v' begin-selection
+bind -t vi-copy 'y' copy-selection
+bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
+bind C-v run "tmux set-buffer - $(reattach-to-user-namespace pbpaste); tmux paste-buffer"
+
View
2  zsh/tmuxinator.zsh
@@ -0,0 +1,2 @@
+export EDITOR=vim
+[[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator
View
2  zshrc
@@ -1,5 +1,6 @@
# We're in tmux, GO GO GO
+export TMPDIR=/tmp/
BASE="$HOME/.dotfiles/zsh/"
source $BASE'key_bindings.zsh'
@@ -23,6 +24,7 @@ source $BASE'ruby.zsh'
source $BASE'rails.zsh'
source $BASE'rvm.zsh'
source $BASE'hitch.zsh'
+source $BASE'tmuxinator.zsh'
export PATH
trim_path
Something went wrong with that request. Please try again.