From 427b78e1405d77bab4a330343a6b3ff68bd3cabd Mon Sep 17 00:00:00 2001 From: David Anema Date: Thu, 6 Dec 2012 10:44:14 +0100 Subject: [PATCH 1/5] Theme showing user@machine:[full path] -> and [date time] in the right --- themes/danema.zsh-theme | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 themes/danema.zsh-theme diff --git a/themes/danema.zsh-theme b/themes/danema.zsh-theme new file mode 100644 index 000000000..148665b39 --- /dev/null +++ b/themes/danema.zsh-theme @@ -0,0 +1,7 @@ +PROMPT='%n%{$reset_color%}%{$fg[red]%}@%m%{$reset_color%}:[%{$fg[green]%}%~%{$reset_color%}]$(git_prompt_info)%{$fg[red]%} ➜ %{$reset_color%}' +RPROMPT='[%{$fg[red]%}%W %t%{$reset_color%}]' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%} <" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY=":%{$fg[red]%}✗%{$fg[red]%}>%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}>" From 2aab54135c52fe1f6562c7bcf36ed63828e6c1a7 Mon Sep 17 00:00:00 2001 From: David Anema Date: Thu, 6 Dec 2012 11:26:05 +0100 Subject: [PATCH 2/5] Corrected color --- themes/danema.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/danema.zsh-theme b/themes/danema.zsh-theme index 148665b39..cbe8ba43c 100644 --- a/themes/danema.zsh-theme +++ b/themes/danema.zsh-theme @@ -3,5 +3,5 @@ RPROMPT='[%{$fg[red]%}%W %t%{$reset_color%}]' ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%} <" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY=":%{$fg[red]%}✗%{$fg[red]%}>%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}>" +ZSH_THEME_GIT_PROMPT_DIRTY=":%{$fg[white]%}✗%{$fg[red]%}>%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[red]%}>" From 2eb006d435e1a099fcb88d80b046f0a9ec4ba9f6 Mon Sep 17 00:00:00 2001 From: David Anema Date: Fri, 7 Dec 2012 10:05:26 +0100 Subject: [PATCH 3/5] Added better GIT-info --- themes/danema.zsh-theme | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/themes/danema.zsh-theme b/themes/danema.zsh-theme index cbe8ba43c..edb727fa5 100644 --- a/themes/danema.zsh-theme +++ b/themes/danema.zsh-theme @@ -1,7 +1,22 @@ -PROMPT='%n%{$reset_color%}%{$fg[red]%}@%m%{$reset_color%}:[%{$fg[green]%}%~%{$reset_color%}]$(git_prompt_info)%{$fg[red]%} ➜ %{$reset_color%}' +function git_prompt_custom() { + ref=$(git symbolic-ref HEAD 2> /dev/null) || return + GIT_STATUS="%{$fg[red]%}<%{$reset_color%}$(git_prompt_info)%{$reset_color%}[%{$fg[green]%}$(git_prompt_short_sha)%{$reset_color%}]$(git_prompt_status)%{$fg[red]%}>" + [[ -n $GIT_STATUS ]] && GIT_STATUS=" $GIT_STATUS" + echo "$ZSH_THEME_GIT_PROMPT_PREFIX$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX" +} + +PROMPT='%n%{$reset_color%}%{$fg[red]%}@%m%{$reset_color%}:[%{$fg[green]%}%~%{$reset_color%}]%u$(git_prompt_custom)%{$fg[red]%} ?^?^? %{$reset_color%}' RPROMPT='[%{$fg[red]%}%W %t%{$reset_color%}]' -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%} <" +ZSH_THEME_GIT_PROMPT_PREFIX="" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY=":%{$fg[white]%}✗%{$fg[red]%}>%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[red]%}>" +ZSH_THEME_GIT_PROMPT_DIRTY=": %{$fg[red]%}?^?^?%{$fg[red]%} " +ZSH_THEME_GIT_PROMPT_CLEAN=": %{$fg[red]%}" + +ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$RED%}unmerged" +ZSH_THEME_GIT_PROMPT_DELETED=" %{$RED%}deleted" +ZSH_THEME_GIT_PROMPT_RENAMED=" %{$YELLOW%}renamed" +ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$YELLOW%}modified" +ZSH_THEME_GIT_PROMPT_ADDED=" %{$GREEN%}added" +ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$WHITE%}untracked" +ZSH_THEME_GIT_PROMPT_AHEAD=" %{$RED%}(!)" From 341af88c1f087e3f0add475603c5cfe0a3859223 Mon Sep 17 00:00:00 2001 From: David Anema Date: Fri, 7 Dec 2012 10:27:38 +0100 Subject: [PATCH 4/5] Fixed symbols --- themes/danema.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/danema.zsh-theme b/themes/danema.zsh-theme index edb727fa5..d9b5a3d98 100644 --- a/themes/danema.zsh-theme +++ b/themes/danema.zsh-theme @@ -5,12 +5,12 @@ function git_prompt_custom() { echo "$ZSH_THEME_GIT_PROMPT_PREFIX$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX" } -PROMPT='%n%{$reset_color%}%{$fg[red]%}@%m%{$reset_color%}:[%{$fg[green]%}%~%{$reset_color%}]%u$(git_prompt_custom)%{$fg[red]%} ?^?^? %{$reset_color%}' +PROMPT='%n%{$reset_color%}%{$fg[red]%}@%m%{$reset_color%}:[%{$fg[green]%}%~%{$reset_color%}]%u$(git_prompt_custom)%{$fg[red]%} ➜ %{$reset_color%}' RPROMPT='[%{$fg[red]%}%W %t%{$reset_color%}]' ZSH_THEME_GIT_PROMPT_PREFIX="" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY=": %{$fg[red]%}?^?^?%{$fg[red]%} " +ZSH_THEME_GIT_PROMPT_DIRTY=": %{$fg[red]%}✗%{$fg[red]%} " ZSH_THEME_GIT_PROMPT_CLEAN=": %{$fg[red]%}" ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$RED%}unmerged" From e822aa80a9edac7e25d1e7c160b9e922ce7bc1b3 Mon Sep 17 00:00:00 2001 From: David Anema Date: Fri, 7 Dec 2012 15:19:33 +0100 Subject: [PATCH 5/5] Colorized GIT-info --- themes/danema.zsh-theme | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/danema.zsh-theme b/themes/danema.zsh-theme index d9b5a3d98..67e72ad4d 100644 --- a/themes/danema.zsh-theme +++ b/themes/danema.zsh-theme @@ -1,6 +1,6 @@ function git_prompt_custom() { ref=$(git symbolic-ref HEAD 2> /dev/null) || return - GIT_STATUS="%{$fg[red]%}<%{$reset_color%}$(git_prompt_info)%{$reset_color%}[%{$fg[green]%}$(git_prompt_short_sha)%{$reset_color%}]$(git_prompt_status)%{$fg[red]%}>" + GIT_STATUS="%{$fg[red]%}<%{$bg[green]%} $(git_prompt_info)%{$bg[green]%}%{$fg[black]%}[%{$fg[red]%}$(git_prompt_short_sha)%{$fg[black]%}]$(git_prompt_status) %{$reset_color%}%{$fg[red]%}>" [[ -n $GIT_STATUS ]] && GIT_STATUS=" $GIT_STATUS" echo "$ZSH_THEME_GIT_PROMPT_PREFIX$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX" } @@ -10,7 +10,7 @@ RPROMPT='[%{$fg[red]%}%W %t%{$reset_color%}]' ZSH_THEME_GIT_PROMPT_PREFIX="" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY=": %{$fg[red]%}✗%{$fg[red]%} " +ZSH_THEME_GIT_PROMPT_DIRTY=": %{$fg[red]%}✗%{$reset_color%}%{$bg[green]%} " ZSH_THEME_GIT_PROMPT_CLEAN=": %{$fg[red]%}" ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$RED%}unmerged" @@ -19,4 +19,4 @@ ZSH_THEME_GIT_PROMPT_RENAMED=" %{$YELLOW%}renamed" ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$YELLOW%}modified" ZSH_THEME_GIT_PROMPT_ADDED=" %{$GREEN%}added" ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$WHITE%}untracked" -ZSH_THEME_GIT_PROMPT_AHEAD=" %{$RED%}(!)" +ZSH_THEME_GIT_PROMPT_AHEAD=" %{$RED%}(!)" \ No newline at end of file