diff --git a/README.md b/README.md index 41760f7..6a16f66 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,19 @@ # ivabus-zsh-theme -Clean zsh prompt theme. +Clean zsh prompt theme. Does not require oh-my-zsh anymore. -## Inside +## Features - root indication - exit codes -- git info +- oh-my-zsh independence ![Screenshot](/screenshot.png) ## How to install -Install ivabus-zsh-theme via curl - - sh -c "$(curl -fsSL https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/install.sh)" - -Install ivabus-zsh-theme via wget - - sh -c "$(wget https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/install.sh -O -)" +Copy ivabus.zsh-theme file to any location and `source` it in your `.zshrc` or just enable it each time you need it in your shell. ## License -[WTFPL](http://www.wtfpl.net) \ No newline at end of file +This zsh theme is distributed under Unlicense. \ No newline at end of file diff --git a/install.sh b/install.sh deleted file mode 100755 index 3821d70..0000000 --- a/install.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -if [ ! -f /bin/zsh ] -then - echo "You need to install zsh." - exit 255 -fi - -if [ ! -d $ZSH ] -then - echo "You need to install oh-my-zsh first." - read -p "Install (y/N)?: " INSTALL_OHMYZSH - if [[ $INSTALL_OHMYZSH == "n" || $INSTALL_OHMYZSH == "N" || $INSTALL_OHMYZSH == "" ]] - then - echo "Exiting" - exit 255 - fi -fi - -if [ -f $(which curl) ] -then - if [[ $INSTALL_OHMYZSH = "y" || $INSTALL_OHMYZSH = "Y" ]] - then - sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" - fi - curl -fsSL https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme > ~/.oh-my-zsh/custom/themes/ivabus.zsh-theme - /usr/bin/env zsh -c "source $ZSH/oh-my-zsh.sh && omz theme set ivabus" - echo "Theme set" - exit 0 -fi - -if [ -f $(which wget) ] -then - if [[ $INSTALL_OHMYZSH = "y" || $INSTALL_OHMYZSH = "Y" ]] - then - sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" - fi - wget https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme -O ~/.oh-my-zsh/custom/themes/ivabus.zsh-theme - /usr/bin/env zsh -c "source $ZSH/oh-my-zsh.sh && omz theme set ivabus" - echo "Theme set" - exit 0 -fi - -echo "Could not find a curl or wget. Install one of them, and then restart this script." -exit 255 diff --git a/ivabus.zsh-theme b/ivabus.zsh-theme index ba05820..af53049 100644 --- a/ivabus.zsh-theme +++ b/ivabus.zsh-theme @@ -2,29 +2,20 @@ __zsh_prompt() { # set basic prompt with "USERNAME@HOSTNAME " if [[ $UID == 0 || $EUID == 0 ]]; then - PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[red]%}%m " + PROMPT="%F{red}%n%f@%F{red}%m " else - PROMPT="%{$fg[green]%}%n%{$reset_color%}@%{$fg[cyan]%}%m " + PROMPT="%F{green}%n%f@%F{cyan}%m " fi # add to current prompt arrow or [exitcode] if non 0 - PROMPT+='%(?:%{$reset_color%}➜ :%{$fg_bold[red]%}%(?..[%?]) )' + PROMPT+='%(?:%f➜ :%B%F{red}%(?..[%?]) )%b' # add current working directory - PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} ' - # and git status - PROMPT+='$(git_prompt_info)' + PROMPT+='%B%F{blue}%(5~|%-1~/…/%3~|%4~)%f%b ' # add $ or # if [[ $UID == 0 || $EUID == 0 ]]; then - PROMPT+='%{$fg[red]%}# %{$reset_color%}' + PROMPT+='%F{red}# %f' else - PROMPT+='%{$fg[white]%}$ %{$reset_color%}' + PROMPT+='%F{white}$ %f' fi unset -f __zsh_prompt } - -# setup git status -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}(%{$fg_bold[red]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%} " -ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[yellow]%}✗%{$fg_bold[cyan]%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[cyan]%}" -__zsh_prompt - +__zsh_prompt \ No newline at end of file diff --git a/screenshot.png b/screenshot.png index 20447b6..0464f4f 100644 Binary files a/screenshot.png and b/screenshot.png differ