Lokaltog/powerline — pull request #206 by wmernagh (2013-02-12 00:13:23+00:00)
Title: Color branch based on repo state

Color the branch in the shell if the repo is modified red and green if not.

This pull will allow the user to customize the branch color in a number of ways.

- Color just the branch symbol

![modified](http://f.cl.ly/items/1X3P1a1W3C2x0a3f3t3n/Screen%20Shot%202013-02-12%20at%201.02.10%20AM.png)

![unmodified](http://f.cl.ly/items/2E0n413c3D021F2u381B/Screen%20Shot%202013-02-12%20at%201.02.55%20AM.png)

```json
{
"module": "powerline.segments.shell",
"name": "branch_status",
"before": " ",
"args": {
"with_branch_name": false
}
},
{
"name": "branch",
"draw_divider": false
}
```

- Color the branch name also

![modified](http://f.cl.ly/items/2l3u1K1I1e1z0Y2D2h1n/Screen%20Shot%202013-02-12%20at%201.04.47%20AM.png)

![unmodified](http://f.cl.ly/items/0J1y1e3C2K120d3y080u/Screen%20Shot%202013-02-12%20at%201.06.37%20AM.png)

```json
{
"module": "powerline.segments.shell",
"name": "branch_status",
"before": " ",
"args": {
"with_branch_name": true
}
}
```

since `with_branch_name` is optional you can also just do

```json
{
"module": "powerline.segments.shell",
"name": "branch_status",
"before": " "
}
```