|
1 | | -# punctual-zsh-theme |
2 | | -Punctual, a Zsh prompt theme |
| 1 | +# Punctual, a Zsh prompt theme |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +Add a bit of flavour to your prompt! My personal Zsh prompt theme, influenced heavily by [denysdovhan](https://github.com/denysdovhan)'s [Spaceship theme](https://github.com/denysdovhan/spaceship-zsh-theme). |
| 6 | + |
| 7 | + |
| 8 | +## Features |
| 9 | + |
| 10 | +* Customisable colours & output |
| 11 | +* Git branch & status display |
| 12 | +* Username turns red when root |
| 13 | +* Prompt turns red if the last command finishes with non-zero exit code |
| 14 | + |
| 15 | + |
| 16 | +## Installation |
| 17 | + |
| 18 | +### Antigen |
| 19 | +Include the following line to `~/.zshrc` as part of your antigen setup (after any [configuration settings](#configuration)). |
| 20 | +```zsh |
| 21 | +antigen theme dannynimmo/punctual-zsh-theme punctual |
| 22 | +``` |
| 23 | + |
| 24 | + |
| 25 | +## Configuration |
| 26 | + |
| 27 | +By setting variables before loading the theme, you can customise the output format of Punctual. |
| 28 | + |
| 29 | +### Hiding parts |
| 30 | + |
| 31 | +Set any of the following variables to `"false"` to hide the output. |
| 32 | + |
| 33 | +```zsh |
| 34 | +PUNCTUAL_SHOW_TIMESTAMP="false"; |
| 35 | +PUNCTUAL_SHOW_USER="false"; |
| 36 | +PUNCTUAL_SHOW_HOSTNAME="false"; |
| 37 | +PUNCTUAL_SHOW_CURRENT_DIR="false"; |
| 38 | +PUNCTUAL_SHOW_GIT="false"; |
| 39 | +``` |
| 40 | + |
| 41 | +### Colours |
| 42 | + |
| 43 | +Set any of the following variables to one of the 8 ANSI colour names. |
| 44 | + |
| 45 | +```zsh |
| 46 | +PUNCTUAL_TIMESTAMP_COLOUR="red"; |
| 47 | +PUNCTUAL_USER_COLOUR="green"; |
| 48 | +PUNCTUAL_ROOT_USER_COLOUR="yellow"; |
| 49 | +PUNCTUAL_HOSTNAME_COLOUR="blue"; |
| 50 | +PUNCTUAL_CURRENT_DIR_COLOUR="magenta"; |
| 51 | +PUNCTUAL_GIT_COLOUR="cyan"; |
| 52 | +``` |
| 53 | + |
| 54 | +Possible values are: |
| 55 | + |
| 56 | +* `black` |
| 57 | +* `red` |
| 58 | +* `green` |
| 59 | +* `yellow` |
| 60 | +* `blue` |
| 61 | +* `magenta` |
| 62 | +* `cyan` |
| 63 | +* `white` |
| 64 | + |
| 65 | +### Timestamp format |
| 66 | + |
| 67 | +Set the below variable to customise the timestamp format. See [`man strftime`](http://man7.org/linux/man-pages/man3/strftime.3.html) for format options. |
| 68 | + |
| 69 | +```zsh |
| 70 | +PUNCTUAL_TIMESTAMP_FORMAT="%l:%M%P"; |
| 71 | +``` |
| 72 | + |
| 73 | +### Prompt symbol |
| 74 | + |
| 75 | +Set the below variable to your favourite prompt symbol (or emoji 😅). |
| 76 | + |
| 77 | +```zsh |
| 78 | +PUNCTUAL_PROMPT="$"; |
| 79 | +``` |
| 80 | + |
| 81 | +### Git status symbols |
| 82 | + |
| 83 | +If you already have your `ZSH_THEME_GIT_PROMPT_*` variables set, Punctual will respect those. Alternatively, set the following variables to customise the Git status symbols. |
| 84 | + |
| 85 | +```zsh |
| 86 | +PUNCTUAL_GIT_SYMBOL_UNTRACKED="?"; |
| 87 | +PUNCTUAL_GIT_SYMBOL_ADDED="+"; |
| 88 | +PUNCTUAL_GIT_SYMBOL_MODIFIED="!"; |
| 89 | +PUNCTUAL_GIT_SYMBOL_RENAMED="!"; |
| 90 | +PUNCTUAL_GIT_SYMBOL_DELETED="!"; |
| 91 | +PUNCTUAL_GIT_SYMBOL_STASHED="*"; |
| 92 | +PUNCTUAL_GIT_SYMBOL_UNMERGED="M"; |
| 93 | +PUNCTUAL_GIT_SYMBOL_AHEAD="↑"; |
| 94 | +PUNCTUAL_GIT_SYMBOL_BEHIND="↓"; |
| 95 | +PUNCTUAL_GIT_SYMBOL_DIVERGED="~"; |
| 96 | +``` |
| 97 | + |
| 98 | + |
| 99 | +## Changelog |
| 100 | + |
| 101 | +### 0.1.0 — 2016-08-01 |
| 102 | +* Released! |
0 commit comments