84c20ce6ddfddf4c0250288ac0ba4cebb936208c

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #482 from volpino/master

Theme chooser + fox's theme

Diff

This diff is truncated to protect this page.

 1diff --git a/themes/fox.zsh-theme b/themes/fox.zsh-theme
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..1959853cf10702ed9ca8c937c62e4b9de3d6e881
 4--- /dev/null
 5+++ b/themes/fox.zsh-theme
 6@@ -0,0 +1,8 @@
 7+#fox theme
 8+PROMPT='%{$fg[cyan]%}┌[%{$fg_bold[white]%}%n%{$reset_color%}%{$fg[cyan]%}☮%{$fg_bold[white]%}%M%{$reset_color%}%{$fg[cyan]%}]%{$fg[white]%}-%{$fg[cyan]%}(%{$fg_bold[white]%}%~%{$reset_color%}%{$fg[cyan]%})$(git_prompt_info)
 9+└> % %{$reset_color%}'
10+
11+ZSH_THEME_GIT_PROMPT_PREFIX="-[%{$reset_color%}%{$fg[white]%}git://%{$fg_bold[white]%}"
12+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}%{$fg[cyan]%}]-"
13+ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}"
14+ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}"
15diff --git a/tools/theme_chooser.sh b/tools/theme_chooser.sh
16new file mode 100755
17index 0000000000000000000000000000000000000000..4d7047444c4073d2e84215ced93b7952c56f8f40
18--- /dev/null
19+++ b/tools/theme_chooser.sh
20@@ -0,0 +1,96 @@
21+#!/bin/zsh
22+
23+# Zsh Theme Chooser by fox (fox91 at anche dot no)
24+# This program is free software. It comes without any warranty, to
25+# the extent permitted by applicable law. You can redistribute it
26+# and/or modify it under the terms of the Do What The Fuck You Want
27+# To Public License, Version 2, as published by Sam Hocevar. See
28+# http://sam.zoy.org/wtfpl/COPYING for more details.
29+
30+THEMES_DIR="$ZSH/themes"
31+FAVLIST="${HOME}/.zsh_favlist"
32+source $ZSH/oh-my-zsh.sh
33+
34+function noyes() {
35+    read "a?$1 [y/N] "
36+    if [[ $a == "N" || $a == "n" || $a = "" ]]; then
37+        return 0
38+    fi
39+    return 1
40+}
41+
42+function theme_preview() {
43+    THEME=$1
44+    THEME_NAME=`echo $THEME | sed s/\.zsh-theme$//`
45+    print "$fg[blue]${(l.((${COLUMNS}-${#THEME_NAME}-5))..─.)}$reset_color $THEME_NAME $fg[blue]───$reset_color"
46+    source "$THEMES_DIR/$THEME"
47+    print -P $PROMPT
48+}
49+
50+function banner() {
51+    echo