From e7dfbe7ad4121628d2e9297d406366e06034e178 Mon Sep 17 00:00:00 2001 From: Alessandro Campagni Date: Sun, 5 May 2013 01:54:30 +0200 Subject: [PATCH] JHBuild ( https://live.gnome.org/Jhbuild ) capable theme from nebirhos --- themes/sciamp.zsh-theme | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 themes/sciamp.zsh-theme diff --git a/themes/sciamp.zsh-theme b/themes/sciamp.zsh-theme new file mode 100644 index 000000000..2fada06f9 --- /dev/null +++ b/themes/sciamp.zsh-theme @@ -0,0 +1,30 @@ +# Based on nebirhos' theme: +# (i) Simple prompt to tell a shell from a JHBuild one (adds [JHB] after host, see below); +# (ii)Full hostname. +# @host[JHB] ➜ currentdir rvm:(rubyversion@gemset) git:(branchname) + +# Get the current ruby version in use with RVM: +if [ -e ~/.rvm/bin/rvm-prompt ]; then + RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:(%{$fg[green]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%})%{$reset_color%} " +else + if which rbenv &> /dev/null; then + RUBY_PROMPT_="%{$fg_bold[blue]%}rbenv:(%{$fg[green]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[blue]%})%{$reset_color%} " + fi +fi + +# Check if /opt/gnome/bin is in your path +# WARNING if you configured jhbuild to put files in /path/to/jhbuild'd/gnome +# you should change /opt/gnome/bin to /path/to/jhbuild'd/gnome +if [[ $PATH == */opt/gnome/bin:* ]]; then + JHBUILD_PROMPT="%{$fg_bold[blue]%}[%{$fg_bold[green]%}JHB%{$fg_bold[blue]%}]%{$fg_bold[red]%}" +fi + +# Get the host name (first 4 chars) +HOST_PROMPT_="%{$fg_bold[red]%}$HOST$JHBUILD_PROMPT ➜ %{$fg_bold[cyan]%}%c " +GIT_PROMPT="%{$fg_bold[blue]%}\$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}" +PROMPT="$HOST_PROMPT_$RUBY_PROMPT_$GIT_PROMPT" + +ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" \ No newline at end of file