Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Kabiru committed Aug 15, 2016
1 parent 54665dd commit ad90e81
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 8 deletions.
Empty file removed README
Empty file.
68 changes: 68 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
![](https://www.dropbox.com/s/u08c2zofducjvh9/rafiki-zsh-2.png?raw=1)

## Rafiki-zsh

Rafiki-zsh is a [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) theme that adds emojis to your zsh terminal.
Rafiki will display a `good` emoji such as :smile: on your prompt whenever commands run smoothly and `bad` emojis
such as :rage: whenever things go wrong.

### Setup

To set up the theme. Ensure that you have [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) installed and setup on your terminal.

Clone the repo or download `rafiki.zsh-theme` file.

$ git clone https://github.com/akabiru/rafiki-zsh


Copy `rafiki.zsh-theme` to `~/.oh-my-zsh/custom/themes/`. This is where your custom themes live.

$ cp /path/to/rafiki.zsh-theme ~/.oh-my-zsh/custom/themes/

Change your zsh theme to rafiki in your `.zshrc` file.

$ vim ~/.zshrc

ZSH_THEME='rafiki'

Restart your terminal and Voila! Rafiki is watching over you.

### Usage

Rafiki generates random emojis every time you start up your terminal. It also tells you who your pals are for the session.

To generate a new set just run `newrafiki`

$ newrafiki

You can also run `rafiki` to remind yourself your emoji set.

$ rafiki

### Customization

Rafiki is pretty customizable.

If you prefer to have a constant set of emojis just set your `good`emoji and `bad` emoji in `.zshrc` as follows.

For good emojis, set `$MY_GOOD_RAFIKI` to one of the following: `fire muscle pointright facepunch smile sunglasses` and
your `bad` emoji to one of the following: `rollingeyes pouting confused flushed middlefinger worried`

$MY_GOOD_RAFIKI='fire'
$MY_BAD_RAFIKI='rollingeyes'

Then reload your zsh configuration.

$ source ~/.zshrc

You can also add your own emojis to the supported set. Just add the emoji name to one of the arrays; `goodemojis` or `bademojis`.
Then add the emoji to the respective array with the name as the key and the emoji as the value.

### Contributing

Feel free to contribute, even if it's to add an emoji. :wink: Just fork it :fork_and_knife: and raise a pull request.

### Credits

This projects borrows from [Robby Russell's](https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/robbyrussell.zsh-theme) theme.
Not forgetting [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) itself. :smile:
16 changes: 8 additions & 8 deletions rafiki.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ B=${#bademojis[@]}
G="$goodemojis[$G]"
B="$bademojis[$B]"

if [[ -n "$MY_RAFIKI_GOOD" ]]; then
if [[ -n "$good[$MY_RAFIKI_GOOD]" ]]; then
RAFIKI_GOOD=good[$MY_RAFIKI_GOOD]
if [[ -n "$MY_GOOD_RAFIKI" ]]; then
if [[ -n "$good[$MY_GOOD_RAFIKI]" ]]; then
RAFIKI_GOOD=good[$MY_GOOD_RAFIKI]
else
echo "$fg_bold[red]$MY_RAFIKI_GOOD is invalid, setting a random one..."
echo "$fg_bold[red]$MY_GOOD_RAFIKI is invalid, setting a random one..."
RAFIKI_GOOD="$good[$G]"
fi
else
RAFIKI_GOOD="$good[$G]"
fi

if [[ -n "$MY_RAFIKI_BAD" ]]; then
if [[ -n "$bad[$MY_RAFIKI_BAD]" ]]; then
RAFIKI_BAD=bad[$MY_RAFIKI_BAD]
if [[ -n "$MY_BAD_RAFIKI" ]]; then
if [[ -n "$bad[$MY_BAD_RAFIKI]" ]]; then
RAFIKI_BAD=bad[$MY_BAD_RAFIKI]
else
echo "$fg_bold[red]$MY_RAFIKI_BAD is invalid, setting a random one..."
echo "$fg_bold[red]$MY_BAD_RAFIKI is invalid, setting a random one..."
RAFIKI_BAD="$bad[$B]"
fi
else
Expand Down

0 comments on commit ad90e81

Please sign in to comment.