Skip to content

Instantly share code, notes, and snippets.

@michaelvobrien
Last active January 17, 2017 17:24

Revisions

  1. michaelvobrien revised this gist Jan 17, 2017. 1 changed file with 27 additions and 12 deletions.
    39 changes: 27 additions & 12 deletions .tmux.conf
    Original file line number Diff line number Diff line change
    @@ -16,27 +16,31 @@ set -g history-limit 5000
    set -g default-terminal screen-256color
    set -g repeat-time 1000
    # mouse
    set -g mouse on
    # status
    set -g base-index 1
    set -g status-bg colour60 # grey
    # set -g status-bg colour220 # yellow
    set -g status-fg black
    setw -g window-status-current-bg white
    setw -g window-status-current-fg black
    set -g status-bg colour235
    set -g status-fg colour244
    set -g status-right ' %H:%M '
    setw -g window-status-current-bg colour240
    setw -g window-status-current-fg colour250
    setw -g window-status-current-format " #I:#W "
    setw -g window-status-format ' #[bg=colour235]#[fg=colour248]#I:#W#F '
    # command-line
    setw -g message-bg black
    setw -g message-fg colour9
    # copy/highlight/help mode
    setw -g mode-fg colour0
    setw -g mode-bg colour248
    # pane
    set -g pane-active-border-fg white
    set -g pane-border-fg colour8
    # mouse
    # set -g mouse-select-pane on
    # set -g mouse-resize-pane on
    # setw -g mode-mouse on
    set -g mouse on
    # bindings
    bind M-` last-window
    bind -r ^ resize-pane -D
    @@ -151,3 +155,14 @@ bind V run-shell "tmux setb \"`ssh localhost pbpaste`\""
    # Layout: Main Tiled
    # select-layout tiled
    # M-5
    #
    # bind-key (alias: bind)
    # * The `-r` flag indicates this key may repeat, see the
    # `repeat-time` option.
    # * `-n` is an alias for `-T root`.
    # * `-T <key-table>`
    #
    # Print Tmux Colors
    # for i in {0..255}; do
    # printf "\x1b[38;5;${i}mcolour${i}\x1b[0m\n"
    # done
  2. michaelvobrien revised this gist Nov 14, 2016. 1 changed file with 106 additions and 5 deletions.
    111 changes: 106 additions & 5 deletions .tmux.conf
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,8 @@ set -g repeat-time 1000
    # status
    set -g base-index 1
    set -g status-bg colour10
    set -g status-bg colour60 # grey
    # set -g status-bg colour220 # yellow
    set -g status-fg black
    setw -g window-status-current-bg white
    setw -g window-status-current-fg black
    @@ -30,12 +31,19 @@ set -g pane-active-border-fg white
    set -g pane-border-fg colour8
    # mouse
    set -g mouse-select-pane on
    set -g mouse-resize-pane on
    setw -g mode-mouse on
    # set -g mouse-select-pane on
    # set -g mouse-resize-pane on
    # setw -g mode-mouse on
    set -g mouse on
    # bindings
    bind M-` last-window
    bind -r ^ resize-pane -D
    bind -r { resize-pane -L
    bind -r } resize-pane -R
    bind ( swap-pane -U
    bind ) swap-pane -D
    bind -n M-} next-window
    bind -n M-{ previous-window
    bind -n M-1 select-window -t :1
    @@ -49,4 +57,97 @@ bind 3 split-window -h
    bind . command-prompt "swap-window -t '%%'"
    bind / command-prompt "split-window -h 'exec man %%'"
    bind R source-file ~/.tmux.conf
    bind k kill-pane
    bind k kill-pane

    # access clipboard from tmux
    bind C run-shell "tmux showb | ssh localhost pbcopy"
    bind V run-shell "tmux setb \"`ssh localhost pbpaste`\""

    # Guide
    #
    # Show bindings
    # list-keys
    # (prefix) ?
    #
    # Show commands
    # list-commands
    #
    # Command
    # (prefix) :
    #
    # Split window horizontally, adding a pane
    # split-window -h
    #
    # Split window vertically, adding a pane
    # split-window -v
    #
    # Focus on next (other) pane
    # select-pane -t :.+
    # (prefix) o
    #
    # Break out a pane, preserving it. Moves pane to new window.
    # break-pane -d
    #
    # Kill a pane, destroying it.
    # kill-pane
    #
    # Move a pane to another window (target)
    # join-pane -t <TARGET_NUMBER>
    #
    # Swap (Rotate) panes clockwise
    # swap-pane -D
    # (prefix) )
    #
    # Swap (Rotate) panes counter-clockwise
    # { swap-pane -U
    # (prefix) (
    #
    # Last pane
    # last-pane
    # (prefix) ;
    #
    # Resize pane: Up
    # resize-pane -U
    # resize-pane -U 5
    #
    # Resize pane: Down
    # resize-pane -D
    # (prefix) ^
    # resize-pane -D 5
    #
    # Resize pane: Left
    # resize-pane -L
    # (prefix) {
    # resize-pane -L 5
    #
    # Resize pane: Right
    # resize-pane -R
    # (prefix) }
    # resize-pane -R 5
    #
    # Move window
    # move-window -t <TARGET_NUMBER>
    # move-window -s <SOURCE_NUMBTER> -t <TARGET_NUMBER>
    #
    # Swap window
    # swap-window -t <TARGET_NUMBER>
    #
    # Layout: Even Horizontal
    # select-layout even-horizontal
    # M-1
    #
    # Layout: Even Vertical
    # select-layout even-vertical
    # M-2
    #
    # Layout: Main Horizontal
    # select-layout main-horizontal
    # M-3
    #
    # Layout: Main Vertical
    # select-layout main-vertical
    # M-4
    #
    # Layout: Main Tiled
    # select-layout tiled
    # M-5
  3. michaelvobrien revised this gist Sep 3, 2012. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions .tmux.conf
    Original file line number Diff line number Diff line change
    @@ -49,8 +49,4 @@ bind 3 split-window -h
    bind . command-prompt "swap-window -t '%%'"
    bind / command-prompt "split-window -h 'exec man %%'"
    bind R source-file ~/.tmux.conf
    bind k kill-pane

    # access clipboard from tmux
    bind C run-shell "tmux showb | ssh localhost pbcopy"
    bind V run-shell "tmux setb \"`ssh localhost pbpaste`\""
    bind k kill-pane
  4. michaelvobrien created this gist Sep 3, 2012.
    56 changes: 56 additions & 0 deletions .tmux.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,56 @@
    ##################################################
    # set-option (alias: set)
    # set-window-option (alias: setw)
    # bind-key (alias: bind)
    # unbind-key (alias: unbind)
    ##################################################

    # prefix
    set -g prefix M-`
    unbind C-b
    # basic
    setw -g mode-keys emacs
    set -g status-keys emacs
    set -g history-limit 5000
    set -g default-terminal screen-256color
    set -g repeat-time 1000
    # status
    set -g base-index 1
    set -g status-bg colour10
    set -g status-fg black
    setw -g window-status-current-bg white
    setw -g window-status-current-fg black
    setw -g message-bg black
    setw -g message-fg colour9
    # pane
    set -g pane-active-border-fg white
    set -g pane-border-fg colour8
    # mouse
    set -g mouse-select-pane on
    set -g mouse-resize-pane on
    setw -g mode-mouse on
    # bindings
    bind M-` last-window
    bind -n M-} next-window
    bind -n M-{ previous-window
    bind -n M-1 select-window -t :1
    bind -n M-2 select-window -t :2
    bind -n M-3 select-window -t :3
    bind -n M-4 select-window -t :4
    bind -n M-5 select-window -t :5
    bind 0 break-pane -d
    bind 2 split-window -v
    bind 3 split-window -h
    bind . command-prompt "swap-window -t '%%'"
    bind / command-prompt "split-window -h 'exec man %%'"
    bind R source-file ~/.tmux.conf
    bind k kill-pane

    # access clipboard from tmux
    bind C run-shell "tmux showb | ssh localhost pbcopy"
    bind V run-shell "tmux setb \"`ssh localhost pbpaste`\""