Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
noccy80 committed Dec 16, 2016
1 parent df76a7d commit fe03f4d
Showing 1 changed file with 52 additions and 15 deletions.
67 changes: 52 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,66 @@
PowerLine: Customizable bash prompt
===================================

PHPl: The Ultimate PHP Powerline
================================

This is a highly customizable powerline prompt generator for PHP. While being 100%
modular, the configuration is processed into a compact ready-to-use cache. Themes
are extremely dynamic, making use of a CSS-like syntax to add styles to panels based
on type, status or class, with 256-color support. And everything can be configured
from the command line.

## Installing

To install, copy this directory to `~/.powerline`. Then source the `powerline.sh` script from
your `.bashrc`:
The recommended method of installing is using the installer, or by using the
`install.sh` script after cloning into a temporary directory. If *phpl* is already
installed, it will be updated.

## Configuration

The initial prompt will display the directory and a status indicator:

~ $

To edit the prompt, use the `phpl-config` command. To make it a bit more boring:

$ phpl-config -i username --first --no-reload
$ phpl-config -i text --after username -s text="@" --no-reload
$ phpl-config -i hostname --after text

The prompt will now look like:

user @ hostname $

$ cp -R src ~/.powerline
$ echo 'source ~/.powerline/powerline.sh' >> ~/.bashrc
## Appearance

To activate, reopen your console or source your `.bashrc` again:
To make the prompt less fluffy, you can create a compact style. Create `~/.powerline/theme/compact.theme`:

$ source ~/.bashrc
* {
pad-before: 0;
pad-after: 0;
}

Activate the theme using `phpl-config`:

## Editing
$ phpl-config --theme compact

Add git status in the best position:
To add some color to the prompt:

$ phpl-config -igit
username hostname {
color: bright-blue;
}
text {
color: white;
}
status:good {
color: green;
}
status:bad {
color: red;
}

Add git status to beginning of prompt:
This will have the following result:

$ phpl-config -igit --first
* The `username` and `hostname` parts will be colored bright blue
* All `text` items will be colored white
* The status indicator (`$`) will be colored green if the last command was successful, and
red otherwise.

Use `-h` for help.

0 comments on commit fe03f4d

Please sign in to comment.