This is just a short follow-up to my older blogpost Adding YaST menuitem to GNOME 3 status menu. Few minutes ago Andy asked me if I could create a proper gnome-shell extension so I went ahead and did it.
I’ve set a git repo on Gitorious and also built the package in my home:prusnak project. If there will be interest from our GNOME Team, I will create a submit request to some GNOME devel project and Factory as well.
If you don’t know this yet, you have to install the gnome-shell-extension-yast-status-menu and then either logout and login or press Alt+F2 and type “r” (which will restart gnome-shell).
Enjoy!

Many of you know already about this feature, but some of you don’t so I wanted to share it with you. I just changed mine PS1 configuration in ~/.bashrc to look like this:
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export PS1='\[\033[1;37m\][\[\033[1;32m\]\u\[\033[0m\]@\h\[\033[0m\] $? \[\033[1;34m\]\w\[\033[0;35m\]$(__git_ps1 " %s")\[\033[1;37m\]]\[\033[0m\] '
Take a look at the following picture to see how it works:

or check the video on youtube.
The number between user@host and the current working directory is the exit status of the most recently executed command (or pipeline). This is great because you don’t have to type echo $? everytime you want to find it out. The __git_ps1 magic will print git branch name if you are inside of the git repository. Furthermore it will add special characters indicating the state of the repo: % – untracked files present, + – new files added, * – some tracked files changed, $ – there is something in the stash (see git stash --help). Pretty cool, right?