-
-
Save dougmorato/2348682 to your computer and use it in GitHub Desktop.
My tmux.conf and a sample Django/compass/hamlpy shell script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# tmux.sh - example for Django/compass/hamlpy tmux dev setup | |
# | |
mydir=/home/dev/movietempest | |
source $mydir/env-django-1.3.2/bin/activate | |
py=$mydir/env-django-1.3.2/bin/python | |
aliaspy=alias py="$py" | |
ses=mt | |
if tmux ls > /dev/null | |
then | |
echo "Killing session $ses" | |
tmux kill-session $mt | |
fi | |
tmux new-session -d -s mt "/bin/bash" > /dev/null | |
tmux split-window -h -t mt:1 "$py $mydir/manage.py runserver; /bin/bash" | |
tmux split-window -v -t mt:1.1 "$py $mydir/hapywa.py $mydir/templates-hamlpy $mydir/templates; /bin/bash" | |
tmux split-window -v -t mt:1.2 "compass watch $mydir/compass; /bin/bash" | |
tmux att -t mt | |
# .tmux.conf | |
# ` is an interesting key for a prefix | |
#set-option -g prefix ` | |
set-option -g prefix C-a | |
unbind-key C-b | |
bind-key ` last-window | |
#bind-key a send-prefix | |
# we might need ` at some point, allow switching | |
# we can also send the prefix char with `-a | |
bind-key F11 set-option -g prefix C-a | |
bind-key F12 set-option -g prefix ` | |
unbind % | |
unbind : | |
bind | split-window -h | |
bind - split-window -v | |
# 0 is too far from ` | |
set -g base-index 1 | |
# set-option -g default-terminal "screen-256color" | |
set-option -g mouse-select-pane on | |
set-option -g status-keys vi | |
set-option -g bell-action any | |
set-option -g set-titles on | |
set-option -g set-titles-string '#H:#S.#I.#P #W #T' # window number,program name,active (or not) | |
set-option -g visual-bell on | |
setw -g mode-keys vi | |
setw -g mode-mouse on | |
setw -g monitor-activity on | |
bind e previous-window | |
bind f next-window | |
bind k select-pane -t :.+ | |
bind j select-pane -t :.- | |
set-option -g status-utf8 on | |
# set-option -g status-justify centre | |
set-option -g status-justify left | |
set-option -g status-bg black | |
set-option -g status-fg white | |
set-option -g status-left-length 40 | |
set-option -g pane-active-border-fg green | |
set-option -g pane-active-border-bg black | |
set-option -g pane-border-fg white | |
set-option -g pane-border-bg black | |
set-option -g message-fg black | |
set-option -g message-bg green | |
#setw -g mode-bg black | |
setw -g window-status-bg black | |
setw -g window-status-current-fg green | |
setw -g window-status-alert-attr default | |
setw -g window-status-alert-fg yellow | |
set -g status-left '#[fg=red]#H#[fg=green]:#[fg=white]#S #[fg=green]][#[default]' | |
# set -g status-right '#[fg=green]][#[fg=white] #T #[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]' | |
set -g status-right '#[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]' | |
set -g history-limit 4096 | |
# `+r reloads the configuration, handy | |
bind r source-file ~/.tmux.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment