Skip to content
This repository has been archived by the owner on Apr 30, 2020. It is now read-only.

Commit

Permalink
Added options to make it like before
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyFreeAgent committed Mar 13, 2013
1 parent f9fc085 commit ff7dd58
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
16 changes: 16 additions & 0 deletions README.md
Expand Up @@ -52,6 +52,16 @@ If you want to display date or non-zero-exit-code of last command next to time:
POWERLINE_RIGHT_A="mixed"
```

If you want to display a custom text next to time:
```
POWERLINE_RIGHT_A="Your very best text"
```

If you want to change the date format to what you want:
```
POWERLINE_DATE_FORMAT="%D{%d-%m}"
```

If you don't want to display your username (the green or red (root) colors are still there):

```
Expand All @@ -64,6 +74,11 @@ If you don't want to display your hostname (the green or red (root) colors are s
POWERLINE_HIDE_HOST_NAME="true"
```

If you don't want to hide git prompt status (new files, modified files, unmerged files, etc):
```
POWERLINE_HIDE_GIT_PROMPT_STATUS="true"
```

If you don't want the blank line before the prompt:

```
Expand Down Expand Up @@ -126,3 +141,4 @@ Contribute
* [itszero](https://github.com/itszero)
* [adrienbrault](https://github.com/adrienbrault)
* [mkraemer](https://github.com/mkraemer)
* [wujtruj](https://github.com/wujtruj)
23 changes: 14 additions & 9 deletions powerline.zsh-theme
@@ -1,17 +1,19 @@
# FreeAgent puts the powerline style in zsh !

if [ "$POWERLINE_DATE_FORMAT" = "" ]; then
POWERLINE_DATE_FORMAT=%D{%Y-%m-%d}
fi

if [ "$POWERLINE_RIGHT_B" = "" ]; then
POWERLINE_RIGHT_B=%D{%H:%M:%S}
fi

if [ "$POWERLINE_RIGHT_A" = "mixed" ]; then
POWERLINE_RIGHT_A=%(?.%D{%d-%m}.%F{133}✘%?)
POWERLINE_RIGHT_A=%(?."$POWERLINE_DATE_FORMAT".%F{red}✘ %?)
elif [ "$POWERLINE_RIGHT_A" = "exit-status" ]; then
POWERLINE_RIGHT_A=%(?.%F{118}✔%?.%F{133}✘%?)
POWERLINE_RIGHT_A=%(?.%F{green}✔ %?.%F{red}✘ %?)
elif [ "$POWERLINE_RIGHT_A" = "date" ]; then
POWERLINE_RIGHT_A=%D{%d-%m}
else
POWERLINE_RIGHT_A=""
POWERLINE_RIGHT_A="$POWERLINE_DATE_FORMAT"
fi

if [ "$POWERLINE_HIDE_USER_NAME" = "" ] && [ "$POWERLINE_HIDE_HOST_NAME" = "" ]; then
Expand Down Expand Up @@ -77,13 +79,16 @@ ZSH_THEME_GIT_PROMPT_AHEAD=" ⬆"
ZSH_THEME_GIT_PROMPT_BEHIND=""
ZSH_THEME_GIT_PROMPT_DIVERGED=""


# if [ "$(git_prompt_info)" = "" ]; then
# POWERLINE_GIT_INFO_LEFT=""
# POWERLINE_GIT_INFO_RIGHT=""
# else
if [ "$POWERLINE_SHOW_GIT_ON_RIGHT" = "" ]; then
POWERLINE_GIT_INFO_LEFT=" %F{blue}%K{white}"$'\ue0b0'"%F{white}%F{black}%K{white}"$'$(git_prompt_info)$(git_prompt_status)%F{white}'
if [ "$POWERLINE_HIDE_GIT_PROMPT_STATUS" = "" ]; then
POWERLINE_GIT_INFO_LEFT=" %F{blue}%K{white}"$'\ue0b0'"%F{white}%F{black}%K{white}"$'$(git_prompt_info)$(git_prompt_status)%F{white}'
else
POWERLINE_GIT_INFO_LEFT=" %F{blue}%K{white}"$'\ue0b0'"%F{white}%F{black}%K{white}"$'$(git_prompt_info)%F{white}'
fi
POWERLINE_GIT_INFO_RIGHT=""
else
POWERLINE_GIT_INFO_LEFT=""
Expand Down Expand Up @@ -114,7 +119,7 @@ if [ "$POWERLINE_NO_BLANK_LINE" = "" ]; then
fi

if [ "$POWERLINE_RIGHT_A" = "" ]; then
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{yellow}"$'\ue0b2'"%k%F{black}%K{yellow} $POWERLINE_RIGHT_B %f%k"
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{black}%K{white} $POWERLINE_RIGHT_B %f%k"
else
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{yellow}"$'\ue0b2'"%k%F{black}%K{yellow} $POWERLINE_RIGHT_B %f%F{240}"$'\ue0b2'"%f%k%K{240}%F{255} $POWERLINE_RIGHT_A %f%k"
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{black}%K{white} $POWERLINE_RIGHT_B %f%F{240}"$'\ue0b2'"%f%k%K{240}%F{255} $POWERLINE_RIGHT_A %f%k"
fi

3 comments on commit ff7dd58

@jeremyFreeAgent
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is for you @shouze! Almost like you want!

@shouze
Copy link

@shouze shouze commented on ff7dd58 Mar 13, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeremyFreeAgent
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shouze Maybe you can find a way to solve the #16 ;)

Please sign in to comment.