From 7a3cb1a8e37bcdd0c462b89c65b99700d25ebea2 Mon Sep 17 00:00:00 2001 From: Matt Sacks Date: Fri, 29 Apr 2011 08:28:46 -0400 Subject: [PATCH 1/3] Add muse theme for 256 color terminals --- themes/muse.zsh-theme | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 themes/muse.zsh-theme diff --git a/themes/muse.zsh-theme b/themes/muse.zsh-theme new file mode 100644 index 0000000..4bd8fb8 --- /dev/null +++ b/themes/muse.zsh-theme @@ -0,0 +1,30 @@ +#!/usr/bin/env zsh +#local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" + +setopt promptsubst + +autoload -U add-zsh-hook + +PROMPT_SUCCESS_COLOR=$FG[117] +PROMPT_FAILURE_COLOR=$FG[124] +PROMPT_VCS_INFO_COLOR=$FG[242] +PROMPT_PROMPT=$FG[077] +GIT_DIRTY_COLOR=$FG[133] +GIT_CLEAN_COLOR=$FG[118] +GIT_PROMPT_INFO=$FG[012] + +PROMPT='%{$PROMPT_SUCCESS_COLOR%}%~%{$reset_color%} %{$GIT_PROMPT_INFO%}$(git_prompt_info)%{$GIT_DIRTY_COLOR%}$(git_prompt_status) %{$reset_color%}%{$PROMPT_PROMPT%}ᐅ%{$reset_color%} ' + +#RPS1="${return_code}" + +ZSH_THEME_GIT_PROMPT_PREFIX="(" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$GIT_PROMPT_INFO%})" +ZSH_THEME_GIT_PROMPT_DIRTY=" %{$GIT_DIRTY_COLOR%}✘" +ZSH_THEME_GIT_PROMPT_CLEAN=" %{$GIT_CLEAN_COLOR%}✔" + +ZSH_THEME_GIT_PROMPT_ADDED="%{$FG[082]%}✚%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_MODIFIED="%{$FG[166]%}✹%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DELETED="%{$FG[160]%}✖%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$FG[220]%}➜%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$FG[082]%}═%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[190]%}✭%{$reset_color%}" From 1ae6df763984ee528f16eb715da57baa0fb9e1c4 Mon Sep 17 00:00:00 2001 From: "Renaud (Nel) Morvan" Date: Mon, 2 May 2011 13:51:16 +0200 Subject: [PATCH 2/3] Relax pattern matching on TERM. Closes #320. --- lib/termsupport.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 3152751..22e7f37 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -4,9 +4,9 @@ #Limited support for Apple Terminal (Terminal can't set window or tab separately) function title { [ "$DISABLE_AUTO_TITLE" != "true" ] || return - if [[ $TERM =~ "^screen" ]]; then + if [[ "$TERM" == screen* ]]; then print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars - elif [[ ($TERM =~ "^xterm") ]] || [[ ($TERM == "rxvt") ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then + elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then print -Pn "\e]2;$2:q\a" #set window name print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal) fi From 3d26995682a502150ab80f1fc5738802b1dc16aa Mon Sep 17 00:00:00 2001 From: Justin Riley Date: Mon, 9 May 2011 10:19:10 -0400 Subject: [PATCH 3/3] remove git status from prompt --- themes/jtriley.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/jtriley.zsh-theme b/themes/jtriley.zsh-theme index ec62a22..15d77ed 100644 --- a/themes/jtriley.zsh-theme +++ b/themes/jtriley.zsh-theme @@ -1,6 +1,6 @@ #PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' PROMPT="%{$fg_bold[cyan]%}%T%{$fg_bold[green]%} %{$fg_bold[white]%}%n%{$fg[magenta]%}@%{$fg_bold[white]%}%m %{$fg_bold[green]%}%d -%{$fg_bold[yellow]%}%% $(git_prompt_info)%{$reset_color%}" +%{$fg_bold[yellow]%}%% %{$reset_color%}" #ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" #ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"