Created
January 10, 2012 20:50
-
-
Save chrisjaure/1591107 to your computer and use it in GitHub Desktop.
byobu statuses and tweaks
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
# make window name in byobu show current git branch | |
# git repo doesn't need to be hard-coded but overwrites custom window name | |
case "$TERM" in | |
screen*) | |
GIT_PS1_SHOWDIRTYSTATE=true | |
PROMPT_COMMAND='echo -ne "\033k$(__git_ps1)\033"' | |
;; | |
esac |
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
# add space between left and right areas | |
set -g status-left '#(byobu-status tmux_left)[' | |
set -g status-right '] #(byobu-status tmux_right)' |
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/sh -e | |
# show current git branch and number of dirty files | |
cd /var/www | |
BRANCHNAME=`git symbolic-ref HEAD` | |
SHORTBRANCHNAME=`git for-each-ref --format='%(refname:short)' $BRANCHNAME` | |
echo "#[default]#[fg=#8F9D6A,bold]$SHORTBRANCHNAME#[default]" | |
DIRTYCOUNT=`git status --porcelain -uno | wc -l` | |
if [ $DIRTYCOUNT != "0" ]; then | |
echo "#[fg=#ff0000]*$DIRTYCOUNT#[default]" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice :-) I just committed your whitespace changes to lp:byobu's usr/share/byobu/profiles/tmux.