README.md 1.95 KB
Newer Older
1
# ViaRézo ZSH Theme
Ayaz Badouraly's avatar
Ayaz Badouraly committed
2

Ayaz Badouraly's avatar
Ayaz Badouraly committed
3
[![WTFPLv2 License](https://img.shields.io/badge/license-WTFPLv2-blue.svg)](http://www.wtfpl.net)
Ayaz Badouraly's avatar
Ayaz Badouraly committed
4

5
This is a theme for ZSH which mainly forks the historical theme used on VIA Centrale Réseaux servers. It can be used with ZSH frameworks such as [Oh-My-ZSH](https://github.com/robbyrussell/oh-my-zsh).
Ayaz Badouraly's avatar
Ayaz Badouraly committed
6

Ayaz Badouraly's avatar
Ayaz Badouraly committed
7
8
9
![General preview](https://cloud.githubusercontent.com/assets/19719047/21297526/3658ab04-c582-11e6-811d-f316d26996b3.png "Oh-My-VIA theme preview")


10
## VCS caption
Ayaz Badouraly's avatar
Ayaz Badouraly committed
11

12
13
14
15
16
17
18
| Color  | State                      | Variable                          |
|:------:|:--------------------------:|:---------------------------------:|
| red    | there are unstaged files   | `OHMYVIAREZO_VCS_COLOR_UNSTAGED`  |
| yellow | there are staged files     | `OHMYVIAREZO_VCS_COLOR_STAGED`    |
| blue   | there are untracked files  | `OHMYVIAREZO_VCS_COLOR_UNTRACKED` |
| cyan   | stash stack is not empty   | `OHMYVIAREZO_VCS_COLOR_STASH`     |
| green  | working directory is clean | `OHMYVIAREZO_VCS_COLOR_CLEAN`     |
Ayaz Badouraly's avatar
Ayaz Badouraly committed
19

Ayaz Badouraly's avatar
Ayaz Badouraly committed
20

21
## Install for Oh-My-ZSH
22

23
In order to use this theme, you have to clone this repository in your Oh-My-ZSH `custom/themes` directory (usually `~/.oh-my-zsh/custom/themes`):
Ayaz Badouraly's avatar
Ayaz Badouraly committed
24

25
26
```shell
git clone https://gitlab.viarezo.fr/ViaRezo/oh-my-viarezo.git $ZSH/custom/themes/oh-my-viarezo
Ayaz Badouraly's avatar
Ayaz Badouraly committed
27
28
29
30
```

You then need to select this theme in your `~/.zshrc` :

31
32
```shell
ZSH_THEME="oh-my-viarezo/viarezo"
Ayaz Badouraly's avatar
Ayaz Badouraly committed
33
```
Ayaz Badouraly's avatar
Ayaz Badouraly committed
34

35
## Customization
Ayaz Badouraly's avatar
Ayaz Badouraly committed
36

37
Time format defaults to `%D{%H:%M}`, but can be overwritten by setting the variable `OHMYVIAREZO_TIME_FORMAT` in your `~/.zshrc`.
Ayaz Badouraly's avatar
Ayaz Badouraly committed
38

39
Hostname may be printed up to the first `.` or hidden with the variable `OHMYVIAREZO_CONTEXT_HOSTNAME`.
40

41
VCS theme can be set through the variable `OHMYVIAREZO_VCS_THEME`.
Ayaz Badouraly's avatar
Ayaz Badouraly committed
42

43

44
## Unit testing
45
46
47
48
49

Oh-My-VIA uses [ZUnit](https://github.com/molovo/zunit) as unit testing framework.

To run the tests, just run:

50
```shell
51
52
53
zunit test
```

54
## License
Ayaz Badouraly's avatar
Ayaz Badouraly committed
55

56
Unless explicitly stated to the contrary, all contents licensed under the [WTFPL](LICENSE).