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

Commit

Permalink
Merge pull request #1231 from Syphdias/status-readme
Browse files Browse the repository at this point in the history
[Docs] updates `status` README
  • Loading branch information
dritter authored Apr 4, 2019
2 parents bfafa4f + f9cd8aa commit 9429fe6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions segments/status/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,26 @@ This segment shows the return code of the last command.

| Variable | Default Value | Description |
|----------|---------------|-------------|
|`P9K_STATUS_CROSS`|`false`|Set to `true` if you wish not to show the error code when the last command returned an error and optionally hide this segment when the last command completed successfully by setting `P9K_STATUS_OK` to `false`.|
|`P9K_STATUS_CROSS`|`false`|Set to `true` if you wish not to show the error code when the last command returned an error.|
|`P9K_STATUS_OK`|`true`|Set to `true` if you wish to show this segment when the last command completed successfully, `false` to hide it.|
|`P9K_STATUS_SHOW_PIPESTATUS`|`true`|Set to `true` if you wish to show the exit status for all piped commands.|
|`P9K_STATUS_HIDE_SIGNAME`|`false`|Set to `true` to show the raw exit code (`1-255`). When set to `false`, values over 128 are shown as `SIGNAME(-n)` (e.g. `KILL(-9)`)|
|`P9K_STATUS_HIDE_SIGNAME`|`false`|Set to `true` to show the raw exit code (`1-255`). When set to `false`, values over 128 are shown as `SIGNAME(n-128)` (e.g. `SIGINT(2)`)|

### Color Customization

You can change the foreground and background color of this segment by setting
```
# Status OK (in conjunction with P9K_STATUS_VERBOSE=true)
# Status OK
P9K_STATUS_OK_FOREGROUND='red'
P9K_STATUS_OK_BACKGROUND='blue'
# Status Error
# Status Error (if P9K_STATUS_CROSS=true)
P9K_STATUS_ERROR_FOREGROUND='red'
P9K_STATUS_ERROR_BACKGROUND='blue'
# Status Error (if P9K_STATUS_CROSS=false)
P9K_STATUS_ERROR_CR_FOREGROUND='red'
P9K_STATUS_ERROR_CR_BACKGROUND='blue'
```

### Customize Icon
Expand All @@ -46,10 +50,12 @@ It can be changed by setting:
```
P9K_STATUS_OK_ICON="my_icon"
P9K_STATUS_ERROR_ICON="my_icon"
P9K_STATUS_ERROR_CR_ICON="my_icon"
```

The Icon color accordingly:
```
P9K_STATUS_OK_ICON_COLOR="red"
P9K_STATUS_ERROR_ICON_COLOR="red"
```
P9K_STATUS_ERROR_CR_ICON_COLOR="red"
```

0 comments on commit 9429fe6

Please sign in to comment.