Merge remote-tracking branch 'ben/dritter/font_mode' into dritter/font_mode

pull/22/head
Dominik Ritter 10 years ago
commit 02531ff582

@ -63,10 +63,12 @@ Here are some screenshots of `powerlevel9k` with default settings:
### Installation ### Installation
There are three different forms of installation that you can use to make use of
this theme:
You just need to install the theme and set `POWERLEVEL9K_MODE='compatible'` * Normal - Theme + Powerline Fonts
to join the experience. If you want to customize your experience even further * Über - Theme + Awesome Powerline Fonts
read the chapter about "[fonts](#fonts)" or about "[segment customization](#segment-customization)". * Bare Bones - Theme Only
#### Install Powerlevel9k #### Install Powerlevel9k
@ -80,6 +82,60 @@ You then need to select this theme in your `~/.zshrc`:
ZSH_THEME="powerlevel9k/powerlevel9k" ZSH_THEME="powerlevel9k/powerlevel9k"
#### Install Powerline Fonts for Normal Configuration
You can find the [installation instructions for Powerline Fonts here]
(https://powerline.readthedocs.org/en/latest/installation/linux.html#fonts-installation).
You can also find the raw font files [in this Github
repository](https://github.com/powerline/fonts) if you want to manually install
them for your OS.
After you have installed Powerline fonts, make the default font in your terminal
emulator the Powerline font you want to use.
This is the default mode for `Powerlevel9k`, and no further configuration is
necessary.
#### Alternative Configuration: Über
Alternatively, you can install [Awesome Powerline
Fonts](https://github.com/gabrielelana/awesome-terminal-fonts), which provide
a number of additional glyphs.
You then need to indicate that you wish to use the additional glyphs by defining
the following in your `~/.zshrc`:
POWERLEVEL9K_MODE='awesome-patched'
If you choose to make use of this, your prompt will look something like this:
![](https://cloud.githubusercontent.com/assets/1544760/7959660/67612918-09fb-11e5-9ef2-2308363c3c51.png)
Note that if you prefer flat segment transitions, you can use the following with
`Awesome Powerline Fonts` installed:
POWERLEVEL9K_MODE='flat'
Which looks like this:
![](https://cloud.githubusercontent.com/assets/1544760/7981324/76d0eb5a-0aae-11e5-9608-d662123d0b0a.png)
#### Alternative Configuration: Bare Bones
This option is best if you prefer not to install additional fonts. This option
will work out-of-the-box if your your terminal font supports the segment
separator characters `\uE0B0` (left segment separator) and `\uE0B2` (right
segment separator).
All you need to do to in this case is install the `Powerlevel9k` theme itself,
as explained above, and then define the following in your `~/.zshrc`:
POWERLEVEL9K_MODE='compatible'
Note that depending on your terminal font, this may still not render
appropriately. This configuration should be used as a back-up.
### Segment Customization ### Segment Customization
Customizing your prompt is easy! Select the segments you want to have displayed, Customizing your prompt is easy! Select the segments you want to have displayed,
@ -158,10 +214,10 @@ Example:
##### Symbols ##### Symbols
The `vcs` segment uses various symbols to tell you the state of your repository. The `vcs` segment uses various symbols to tell you the state of your repository.
These symbols depend on your installed [Font](#fonts) and your `POWERLEVEL9K_MODE` These symbols depend on your installed font and selected `POWERLEVEL9K_MODE`
set. from the [Installation](#Installation) section above.
| `compatible` | `powerline-patched` | `awesome-patched` | explanation | `Bare Bones` | `Normal` | `Über` | explanation
|--------------|---------------------|-------------------|-------------------------- |--------------|---------------------|-------------------|--------------------------
| `↑4` | `↑4` | ![icon_outgoing](https://cloud.githubusercontent.com/assets/1544760/7976089/b5904d6e-0a76-11e5-8147-5e873ac52d79.gif)4 | Number of commits your repository is ahead of your remote branch | `↑4` | `↑4` | ![icon_outgoing](https://cloud.githubusercontent.com/assets/1544760/7976089/b5904d6e-0a76-11e5-8147-5e873ac52d79.gif)4 | Number of commits your repository is ahead of your remote branch
| `↓5` | `↓5` | ![icon_incoming](https://cloud.githubusercontent.com/assets/1544760/7976091/b5909c9c-0a76-11e5-9cad-9bf0a28a897c.gif)5 | Number of commits your repository is behind of your remote branch | `↓5` | `↓5` | ![icon_incoming](https://cloud.githubusercontent.com/assets/1544760/7976091/b5909c9c-0a76-11e5-9cad-9bf0a28a897c.gif)5 | Number of commits your repository is behind of your remote branch
@ -181,27 +237,6 @@ set.
You can configure the look and feel of your prompt easily with some built-in You can configure the look and feel of your prompt easily with some built-in
options. options.
#### Fonts
If you set `POWERLEVEL9K_MODE='compatible'` you just get a little glimpse of
the beauty of this theme.
To get nicer Icons you need to install a [powerline-patched](https://github.com/Lokaltog/powerline-fonts) font.
In your terminal emulator you need to select this font and in your `~/.zshrc` you need
to set `POWERLEVEL9K_MODE='powerline-patched'`.
You can find the [installation instructions here](https://powerline.readthedocs.org/en/latest/installation/linux.html#fonts-installation).
You can also find the raw font files [in this Github repository](https://github.com/powerline/fonts) if you want to manually install them for your OS.
Screenshot:
![](http://bhilburn.org/content/images/2015/01/pl9k-improved.png)
If even these Icons did not impress you, have a look at `POWERLEVEL9K_MODE='awesome-patched'`.
For this mode, you have to install a [awesome-patched](https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched) font and set the according mode.
Screenshot:
![](https://cloud.githubusercontent.com/assets/1544760/7959660/67612918-09fb-11e5-9ef2-2308363c3c51.png)
If you prefer segements as rectangles, just set `POWERLEVEL9K_MODE='flat'`, but
beware: You still need a [awesome-patched](https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched) font.
#### Double-Lined Prompt #### Double-Lined Prompt
By default, `powerlevel9k` is a single-lined prompt. If you would like to have By default, `powerlevel9k` is a single-lined prompt. If you would like to have

@ -46,11 +46,13 @@
CURRENT_BG='NONE' CURRENT_BG='NONE'
# These characters require the Powerline fonts to work properly. If see boxes or # These characters require the Powerline fonts to work properly. If see boxes or
# bizarre characters below, your fonts are not correctly installed. In case you # bizarre characters below, your fonts are not correctly installed. If you
# do not want to install a special font, you can set `POWERLEVEL9K_MODE` to # do not want to install a special font, you can set `POWERLEVEL9K_MODE` to
# `compatible`. This shows all icons in regular symbols. # `compatible`. This shows all icons in regular symbols.
case $POWERLEVEL9K_MODE in case $POWERLEVEL9K_MODE in
'flat') 'flat')
# Awesome-Patched Font required!
# See https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched
LEFT_SEGMENT_SEPARATOR='' LEFT_SEGMENT_SEPARATOR=''
RIGHT_SEGMENT_SEPARATOR='' RIGHT_SEGMENT_SEPARATOR=''
ROOT_ICON="\uE801" #  ROOT_ICON="\uE801" # 
@ -103,7 +105,8 @@ case $POWERLEVEL9K_MODE in
VCS_HG_ICON='HG' VCS_HG_ICON='HG'
;; ;;
'awesome-patched') 'awesome-patched')
# Awesome-Patched Font required! See https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched # Awesome-Patched Font required!
# See https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched
LEFT_SEGMENT_SEPARATOR="\uE0B0" #  LEFT_SEGMENT_SEPARATOR="\uE0B0" # 
RIGHT_SEGMENT_SEPARATOR="\uE0B2" #  RIGHT_SEGMENT_SEPARATOR="\uE0B2" # 
ROOT_ICON="\u26A1" # ⚡ ROOT_ICON="\u26A1" # ⚡
@ -132,7 +135,8 @@ case $POWERLEVEL9K_MODE in
VCS_HG_ICON="\uE1C3 " #  VCS_HG_ICON="\uE1C3 " # 
;; ;;
*) *)
# Powerline-Patched Font required! See https://github.com/Lokaltog/powerline-fonts # Powerline-Patched Font required!
# See https://github.com/Lokaltog/powerline-fonts
LEFT_SEGMENT_SEPARATOR="\uE0B0" #  LEFT_SEGMENT_SEPARATOR="\uE0B0" # 
RIGHT_SEGMENT_SEPARATOR="\uE0B2" #  RIGHT_SEGMENT_SEPARATOR="\uE0B2" # 
ROOT_ICON="\u26A1" # ⚡ ROOT_ICON="\u26A1" # ⚡

Loading…
Cancel
Save