Created
December 13, 2010 15:25
-
-
Save trotter/739091 to your computer and use it in GitHub Desktop.
it's mah tmux conf and bash functions
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
| # Change prefix key to Ctrl+\ | |
| unbind C-b | |
| set -g prefix C-\ | |
| # Last active window | |
| unbind l | |
| bind C-\ last-window | |
| # Use Vi mode | |
| setw -g mode-keys vi | |
| # Use mouse in copy mode | |
| setw -g mode-mouse on | |
| # History | |
| set -g history-limit 1000 | |
| # Status Bar | |
| set -g status-bg black | |
| set -g status-fg white | |
| set -g status-interval 1 | |
| set -g status-left '#[fg=green]#H#[default]' | |
| set -g status-left-length 12 | |
| set -g status-right '#[fg=cyan]%Y-%m-%d %H:%M:%S#[default]' | |
| set -g status-justify centre | |
| # Paste mode | |
| bind Escape copy-mode | |
| # Window splitting | |
| unbind % | |
| bind | split-window -h | |
| bind h split-window -h | |
| unbind '"' | |
| bind - split-window -v | |
| bind v split-window -v |
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
| function start-tmux { | |
| name=${1:-"awesome-town"} | |
| tmux new-session -d -s $name | |
| tmux rename-window -t $name:0 'editor' | |
| tmux new-window -t $name:1 -n 'shell' | |
| tmux new-window -t $name:2 -n 'server' | |
| tmux new-window -t $name:3 -n 'other' | |
| tmux select-window -t $name:1 | |
| tmux select-window -t $name:0 | |
| tmux -2 attach-session -t $name | |
| } | |
| function tmux-each-window { | |
| for window in $(tmux list-windows | grep -v '^ *layout' | cut -d: -f1); do | |
| tmux select-window -t $window | |
| for arg in $@; do | |
| tmux send-keys $arg | |
| tmux send-keys " " | |
| done | |
| tmux send-keys " | |
| " | |
| done | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment