Skip to content
Browse files

Initial commit

  • Loading branch information...
0 parents commit 891272a37f3991c7bdb87424c44d24d641c68425 @xuxiaodong committed Jul 1, 2012
Showing with 135 additions and 0 deletions.
  1. +11 −0 README.md
  2. +94 −0 _tmux.conf
  3. BIN screenshot.png
  4. +30 −0 tmuxen
11 README.md
@@ -0,0 +1,11 @@
+About
+-----
+
+tmux environment made easy.
+
+![tmux](https://github.com/xuxiaodong/tmuxen/raw/master/screenshot.png)
+
+Installation
+------------
+
+ git clone git://github.com/xuxiaodong/tmuxen.git
94 _tmux.conf
@@ -0,0 +1,94 @@
+#
+# author : Xu Xiaodong <xxdlhy@gmail.com>
+# modified : 2012 Jul 01
+#
+
+#-- base --#
+set -g default-terminal "screen-256color"
+set -g display-time 3000
+set -g history-limit 65535
+set -g base-index 1
+set -g pane-base-index 1
+set -s escape-time 0
+
+#-- bindkeys --#
+set -g prefix ^a
+unbind ^b
+bind a send-prefix
+
+unbind '"'
+bind - splitw -v
+unbind %
+bind | splitw -h
+
+bind k selectp -U
+bind j selectp -D
+bind h selectp -L
+bind l selectp -R
+
+bind -r ^k resizep -U 10
+bind -r ^j resizep -D 10
+bind -r ^h resizep -L 10
+bind -r ^l resizep -R 10
+
+bind ^u swapp -U
+bind ^d swapp -D
+
+bind ^e last
+bind q killp
+
+bind ! splitw htop
+bind m command-prompt "splitw 'exec man %%'"
+bind @ command-prompt "splitw 'exec perldoc -t -f %%'"
+bind * command-prompt "splitw 'exec perldoc -t -v %%'"
+bind % command-prompt "splitw 'exec perldoc -t %%'"
+bind / command-prompt "splitw 'exec ri %%'"
+
+#-- statusbar --#
+set -g status-utf8 on
+set -g status-interval 1
+set -g status-keys vi
+
+setw -g mode-keys vi
+setw -g automatic-rename off
+
+#-- colorscheme --#
+# see also: https://github.com/daethorian/conf-tmux/blob/master/colors/zenburn.conf
+
+# modes
+setw -g clock-mode-colour colour223
+setw -g mode-attr bold
+setw -g mode-fg colour223
+setw -g mode-bg colour235
+
+# panes
+set -g pane-border-bg colour234
+set -g pane-border-fg colour234
+set -g pane-active-border-bg colour232
+set -g pane-active-border-fg colour232
+
+# statusbar
+set -g status-justify centre
+set -g status-bg colour235
+set -g status-fg colour248
+set -g status-attr dim
+set -g status-left "#[default]» #[fg=colour187]#S #[default]• #[fg=colour187]w#I.p#P#[default]"
+set -g status-left-attr bright
+set -g status-left-length 20
+set -g status-right "#[fg=colour174]#(/home/xiaodong/bin/uptime) #[default]• #[fg=colour174]#(cut -d ' ' -f 1-3 /proc/loadavg)"
+set -g status-right-attr bright
+set -g status-right-length 80
+
+setw -g window-status-current-fg colour223
+setw -g window-status-current-bg colour237
+setw -g window-status-current-attr bold
+setw -g window-status-current-format '#I:#W#F'
+
+#setw -g window-status-alert-attr bold
+#setw -g window-status-alert-fg colour255
+#setw -g window-status-alert-bg colour160
+
+# messages
+set -g message-attr bold
+set -g message-fg colour223
+set -g message-bg colour235
BIN screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 tmuxen
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# name : tmuxen, tmux environment made easy
+# author : Xu Xiaodong <xxdlhy@gmail.com>
+# created : 2012 Jul 01
+# modified : 2012 Jul 01
+#
+
+cmd=$(which tmux) # tmux path
+session=codefun # session name
+
+if [ -z $cmd ]; then
+ echo "You need to install tmux."
+ exit 1
+fi
+
+if [ ! $($cmd has -t $session) ]; then
+ $cmd new -d -n vim -s $session "vim"
+ $cmd splitw -v -p 20 -t $session "pry"
+ $cmd neww -n mutt -t $session "mutt"
+ $cmd neww -n irssi -t $session "irssi"
+ $cmd neww -n cmus -t $session "cmus"
+ $cmd neww -n zsh -t $session "zsh"
+ $cmd splitw -h -p 50 -t $session "zsh"
+ $cmd selectw -t $session:5
+fi
+
+$cmd att -t $session
+
+exit 0

0 comments on commit 891272a

Please sign in to comment.
Something went wrong with that request. Please try again.