From 4beda4f1c201cb61c998775c40f527e02a9fb833 Mon Sep 17 00:00:00 2001 From: Sean Jones Date: Mon, 3 Dec 2012 12:06:06 +0000 Subject: [PATCH 01/12] Changed the error message for linux when no battery is detected. --- plugins/battery/battery.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh index 95f890632..2d6c2607a 100644 --- a/plugins/battery/battery.plugin.zsh +++ b/plugins/battery/battery.plugin.zsh @@ -63,7 +63,7 @@ elif [[ $(uname) == "Linux" ]] ; then echo "%{$fg[$color]%}[$(battery_pct_remaining)%%]%{$reset_color%}" } else - error_msg='no battery' + error_msg="∞" function battery_pct_remaining() { echo $error_msg } function battery_time_remaining() { echo $error_msg } function battery_pct_prompt() { echo '' } From 586c90925d431e504d219d90d4b961d0c9941120 Mon Sep 17 00:00:00 2001 From: Sean Jones Date: Wed, 5 Dec 2012 00:11:35 +0000 Subject: [PATCH 02/12] Possible work around for issue #1315 --- README.textile | 4 ++-- tools/install.sh | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.textile b/README.textile index 0a4545bac..ac94218f2 100644 --- a/README.textile +++ b/README.textile @@ -13,11 +13,11 @@ You can install this via the command line with either `curl` or `wget`. h4. via `curl` -@curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh@ +@curl -L -O https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh && sh install.sh@ h4. via `wget` -@wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh@ +@wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh && sh install.sh@ h3. The manual way diff --git a/tools/install.sh b/tools/install.sh index 6f58db939..3129f4be2 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -36,4 +36,3 @@ echo "\033[0;32m"' /____/ '"\033[0m echo "\n\n \033[0;32m....is now installed.\033[0m" /usr/bin/env zsh -source ~/.zshrc From 5403f447461bc24266e754e5540622a89cd8c753 Mon Sep 17 00:00:00 2001 From: Sean Jones Date: Wed, 5 Dec 2012 00:21:04 +0000 Subject: [PATCH 03/12] Adding possible solution for source .zshrc --- tools/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/install.sh b/tools/install.sh index 3129f4be2..989e3e61c 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -35,4 +35,6 @@ echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m echo "\033[0;32m"' /____/ '"\033[0m" echo "\n\n \033[0;32m....is now installed.\033[0m" +#!`which zsh` +exec source .zshrc /usr/bin/env zsh From a3f56be2b4f29ee1a73f4f6d2358d335015060ab Mon Sep 17 00:00:00 2001 From: Sean Jones Date: Wed, 5 Dec 2012 00:22:32 +0000 Subject: [PATCH 04/12] Changed URLs to work from my fork --- README.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.textile b/README.textile index ac94218f2..8e847fa67 100644 --- a/README.textile +++ b/README.textile @@ -13,11 +13,11 @@ You can install this via the command line with either `curl` or `wget`. h4. via `curl` -@curl -L -O https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh && sh install.sh@ +@curl -L -O https://github.com/NeuralSandwich/oh-my-zsh/raw/master/tools/install.sh && sh install.sh@ h4. via `wget` -@wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh && sh install.sh@ +@wget --no-check-certificate https://github.com/NeuralSandwich/oh-my-zsh/raw/master/tools/install.sh && sh install.sh@ h3. The manual way From 45b13a221535e9167d8560ee7a6286a6eae882d1 Mon Sep 17 00:00:00 2001 From: Sean Jones Date: Wed, 5 Dec 2012 00:41:27 +0000 Subject: [PATCH 05/12] Working install on Debian --- tools/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 989e3e61c..585e35bdd 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -35,6 +35,5 @@ echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m echo "\033[0;32m"' /____/ '"\033[0m" echo "\n\n \033[0;32m....is now installed.\033[0m" -#!`which zsh` -exec source .zshrc +echo "source .zshrc" | zsh /usr/bin/env zsh From 7a0be72ecf920f6cfda89a916f5543195282bbaf Mon Sep 17 00:00:00 2001 From: Sean Jones Date: Wed, 5 Dec 2012 00:52:09 +0000 Subject: [PATCH 06/12] Changed URLs back to officals --- README.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.textile b/README.textile index 8e847fa67..e441d51b4 100644 --- a/README.textile +++ b/README.textile @@ -13,11 +13,11 @@ You can install this via the command line with either `curl` or `wget`. h4. via `curl` -@curl -L -O https://github.com/NeuralSandwich/oh-my-zsh/raw/master/tools/install.sh && sh install.sh@ +@curl -L -O https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh && sh install.sh@ h4. via `wget` -@wget --no-check-certificate https://github.com/NeuralSandwich/oh-my-zsh/raw/master/tools/install.sh && sh install.sh@ +@wget --no-check-certificate https://github.com/robbyrussel/oh-my-zsh/raw/master/tools/install.sh && sh install.sh@ h3. The manual way From d83c6116f560d55cf80af8b4cd9e1de7f3572c7d Mon Sep 17 00:00:00 2001 From: Sean Jones Date: Wed, 5 Dec 2012 16:45:54 +0000 Subject: [PATCH 07/12] Added check for zsh installation (@TomDiddle commit:f80b2727) --- tools/install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/install.sh b/tools/install.sh index 40690a497..f4ec478a1 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -1,3 +1,11 @@ +which zsh>/dev/null +RES=$? +if [ $RES -ne 0 ] +then + echo "\033[0;33mYou do not have zsh installed.\033[0m You'll need to install zsh first if you want to install oh-my-zsh" + exit +fi + if [ -d ~/.oh-my-zsh ] then echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove ~/.oh-my-zsh if you want to install" From b0b8455638f3919bf77269d54e258a66caaea3d6 Mon Sep 17 00:00:00 2001 From: Sean Jones Date: Tue, 29 Jan 2013 11:22:40 +0000 Subject: [PATCH 08/12] Update plugins/battery/battery.plugin.zsh Edited Linux portion of script to update after each command. --- plugins/battery/battery.plugin.zsh | 31 ++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh index 2d6c2607a..1540166de 100644 --- a/plugins/battery/battery.plugin.zsh +++ b/plugins/battery/battery.plugin.zsh @@ -48,11 +48,21 @@ if [[ $(uname) == "Darwin" ]] ; then elif [[ $(uname) == "Linux" ]] ; then - if [[ $(acpi 2&>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] ; then - function battery_pct_remaining() { echo "$(acpi | cut -f2 -d ',' | tr -cd '[:digit:]')" } - function battery_time_remaining() { echo $(acpi | cut -f3 -d ',') } - function battery_pct_prompt() { - b=$(battery_pct_remaining) + function battery_pct_remaining() { + if [[ $(acpi 2&>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] ; then + echo "$(acpi | cut -f2 -d ',' | tr -cd '[:digit:]')" + fi + } + + function battery_time_remaining() { + if [[ $(acpi 2&>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] ; then + echo $(acpi | cut -f3 -d ',') + fi + } + + function battery_pct_prompt() { + b=$(battery_pct_remaining) + if [[ $(acpi 2&>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] ; then if [ $b -gt 50 ] ; then color='green' elif [ $b -gt 20 ] ; then @@ -61,11 +71,8 @@ elif [[ $(uname) == "Linux" ]] ; then color='red' fi echo "%{$fg[$color]%}[$(battery_pct_remaining)%%]%{$reset_color%}" - } - else - error_msg="∞" - function battery_pct_remaining() { echo $error_msg } - function battery_time_remaining() { echo $error_msg } - function battery_pct_prompt() { echo '' } - fi + else + echo "" + fi + } fi From 4efd990ff1951ecd26a0d8b4091041527c53831f Mon Sep 17 00:00:00 2001 From: Sean Jones Date: Tue, 29 Jan 2013 11:40:12 +0000 Subject: [PATCH 09/12] Added the inifinite symbol --- plugins/battery/battery.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh index 1540166de..cc9342c77 100644 --- a/plugins/battery/battery.plugin.zsh +++ b/plugins/battery/battery.plugin.zsh @@ -42,7 +42,7 @@ if [[ $(uname) == "Darwin" ]] ; then fi echo "%{$fg[$color]%}[$(battery_pct_remaining)%%]%{$reset_color%}" else - echo "" + echo "∞" fi } @@ -72,7 +72,7 @@ elif [[ $(uname) == "Linux" ]] ; then fi echo "%{$fg[$color]%}[$(battery_pct_remaining)%%]%{$reset_color%}" else - echo "" + echo "∞" fi } fi From feb578881f1f0ae8a37688b18bf90e27e04e5f05 Mon Sep 17 00:00:00 2001 From: Sean Jones Date: Tue, 29 Jan 2013 11:52:54 +0000 Subject: [PATCH 10/12] Changed links for installer to My github --- README.textile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.textile b/README.textile index e441d51b4..eeba6fceb 100644 --- a/README.textile +++ b/README.textile @@ -13,18 +13,18 @@ You can install this via the command line with either `curl` or `wget`. h4. via `curl` -@curl -L -O https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh && sh install.sh@ +@curl -L https://github.com/NeuralSandwich/oh-my-zsh/raw/master/tools/install.sh | sh@ h4. via `wget` -@wget --no-check-certificate https://github.com/robbyrussel/oh-my-zsh/raw/master/tools/install.sh && sh install.sh@ +@wget --no-check-certificate https://github.com/NeuralSandwich/oh-my-zsh/raw/master/tools/install.sh -O - | sh@ h3. The manual way 1. Clone the repository - @git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@ + @git clone git://github.com/NeuralSandwich/oh-my-zsh.git ~/.oh-my-zsh@ 2. *OPTIONAL* Backup your existing ~/.zshrc file @@ -50,7 +50,7 @@ h2. Usage * enable the plugins you want in your @~/.zshrc@ (take a look at @plugins/@ to see what's possible) ** example: @plugins=(git osx ruby)@ * Theme support: Change the @ZSH_THEME@ environment variable in @~/.zshrc@. -** Take a look at the "current themes":https://wiki.github.com/robbyrussell/oh-my-zsh/themes that come bundled with _Oh My Zsh_. +** Take a look at the "current themes":https://wiki.github.com/NeuralSandwich/oh-my-zsh/themes that come bundled with _Oh My Zsh_. * much much more... take a look at @lib/@ what _Oh My Zsh_ offers... h2. Useful @@ -84,6 +84,6 @@ h2. Contributors This project wouldn't exist without all of our awesome users and contributors. -* "View our growing list of contributors":https://github.com/robbyrussell/oh-my-zsh/contributors +* "View our growing list of contributors":https://github.com/NeuralSandwich/oh-my-zsh/contributors Thank you so much! From 555b0944037fd812df01be80dc83765a58aade9c Mon Sep 17 00:00:00 2001 From: Sean Jones Date: Tue, 29 Jan 2013 12:02:25 +0000 Subject: [PATCH 11/12] Updated installer to use my github --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index f4ec478a1..2908681c6 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -13,7 +13,7 @@ then fi echo "\033[0;34mCloning Oh My Zsh...\033[0m" -hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh || { +hash git >/dev/null && /usr/bin/env git clone https://github.com/NeuralSandwichl/oh-my-zsh.git ~/.oh-my-zsh || { echo "git not installed" exit } From fc6f3fc603ce49e966112be3c13b33340bcd8ab6 Mon Sep 17 00:00:00 2001 From: Sean Jones Date: Tue, 29 Jan 2013 12:05:05 +0000 Subject: [PATCH 12/12] Removed Mercurial prompt info from theme --- themes/candy-kingdom.zsh-theme | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/themes/candy-kingdom.zsh-theme b/themes/candy-kingdom.zsh-theme index 25aeb6597..5459d8eb8 100644 --- a/themes/candy-kingdom.zsh-theme +++ b/themes/candy-kingdom.zsh-theme @@ -7,24 +7,12 @@ # Create: # Modified: -if [ "x$OH_MY_ZSH_HG" = "x" ]; then - OH_MY_ZSH_HG="hg" -fi - -function hg_prompt_info { - $OH_MY_ZSH_HG prompt --angle-brackets "\ -< on %{$fg[magenta]%}%{$reset_color%}>\ -< at %{$fg[yellow]%}%{$reset_color%}>\ -%{$fg[green]%}%{$reset_color%}< -patches: >" 2>/dev/null -} - function box_name { [ -f ~/.box-name ] && cat ~/.box-name || hostname -s } PROMPT=' -%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) +%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) %(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ ' ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[magenta]%}branch: "