Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Commit fab0e29

Browse files
SneakySenseiJanDeDobbeleer
authored andcommitted
add theme example to readme
1 parent 234668d commit fab0e29

File tree

2 files changed

+28
-23
lines changed

2 files changed

+28
-23
lines changed

README.md

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
## Table of Contents
1616

17-
* [About](#about)
18-
* [Prerequisites](#prerequisites)
19-
* [Installation](#installation)
20-
* [Configuration](#configuration)
21-
* [Helper functions](#helper-functions)
22-
* [Themes](#themes)
17+
- [About](#about)
18+
- [Prerequisites](#prerequisites)
19+
- [Installation](#installation)
20+
- [Configuration](#configuration)
21+
- [Helper functions](#helper-functions)
22+
- [Themes](#themes)
2323

2424
## About
2525

@@ -31,16 +31,16 @@ More information about why I made this can be found on my [blog].
3131

3232
Features:
3333

34-
* Easy installation
35-
* Awesome prompt themes for PowerShell in ConEmu
36-
* Git status indications (powered by posh-git)
37-
* Failed command indication
38-
* Admin indication
39-
* Current session indications (admin, failed command, user)
40-
* Configurable
41-
* Easily create your own theme
42-
* Separate settings for oh-my-posh and posh-git
43-
* Does not mess with the default Powershell console
34+
- Easy installation
35+
- Awesome prompt themes for PowerShell in ConEmu
36+
- Git status indications (powered by posh-git)
37+
- Failed command indication
38+
- Admin indication
39+
- Current session indications (admin, failed command, user)
40+
- Configurable
41+
- Easily create your own theme
42+
- Separate settings for oh-my-posh and posh-git
43+
- Does not mess with the default Powershell console
4444

4545
## Prerequisites
4646

@@ -127,9 +127,9 @@ $ThemeSettings
127127
You can tweak the settings by manipulating `$ThemeSettings`.
128128
This example allows you to tweak the branch symbol using a unicode character:
129129

130-
````powershell
130+
```powershell
131131
$ThemeSettings.GitSymbols.BranchSymbol = [char]::ConvertFromUtf32(0xE0A0)
132-
````
132+
```
133133

134134
Also do not forget the Posh-Git settings itself (enable the stash indication for example):
135135

@@ -145,7 +145,7 @@ $DefaultUser = 'yourUsernameHere'
145145

146146
## Helper functions
147147

148-
`Set-Theme`: set a theme from the Themes directory. If no match is found, it will not be changed. Autocomplete is available to list and complete available themes.
148+
`Set-Theme`: set a theme from the Themes directory. If no match is found, it will not be changed. Autocomplete is available to list and complete available themes.
149149

150150
```powershell
151151
Set-Theme paradox
@@ -218,13 +218,17 @@ Set-Theme paradox
218218

219219
![Emodipt Theme][img-theme-emodipt]
220220

221+
### Operator
222+
223+
![Operator Theme][img-theme-operator]
224+
221225
## Creating your own theme
222226

223227
If you want to create a theme it can be done rather easily by adding a `mytheme.psm1` file in the folder indicated in `$ThemeSettings.MyThemesLocation` (the folder defaults to `~\Documents\WindowsPowerShell\PoshThemes`, feel free to change it).
224228

225229
The only required function is `Write-Theme`. You can use the following template to get started:
226230

227-
````powershell
231+
```powershell
228232
#requires -Version 2 -Modules posh-git
229233
230234
function Write-Theme
@@ -240,7 +244,7 @@ function Write-Theme
240244
}
241245
242246
$sl = $global:ThemeSettings #local settings
243-
````
247+
```
244248

245249
Feel free to use the public helper functions `Get-VCSStatus`, `Get-VcsInfo`, `Get-FormattedRootLocation`, `Get-ShortPath`, `Set-CursorForRightBlockWrite`, `Set-CursorUp`, `Set-Newline` or add your own logic completely.
246250

@@ -282,8 +286,8 @@ if($env:LC_TERMINAL -eq "iTerm2") {
282286

283287
### Based on work by
284288

285-
* [Chris Benti][chrisbenti-psconfig]
286-
* [Keith Dahlby][keithdahlby-poshgit]
289+
- [Chris Benti][chrisbenti-psconfig]
290+
- [Keith Dahlby][keithdahlby-poshgit]
287291

288292
[build-status-badge]: https://img.shields.io/appveyor/ci/janjoris/oh-my-posh/master.svg?maxAge=2592000
289293
[build-status]: https://ci.appveyor.com/project/JanJoris/oh-my-posh
@@ -336,4 +340,5 @@ if($env:LC_TERMINAL -eq "iTerm2") {
336340
[img-theme-star]: img/star.png
337341
[img-theme-zash]: img/zash.png
338342
[img-theme-emodipt]: img/emodipt.png
343+
[img-theme-operator]: img/operator.png
339344
[consoletitle]: https://github.com/JanDeDobbeleer/oh-my-posh/issues/261#issuecomment-649701607

img/operator.png

11.8 KB
Loading

0 commit comments

Comments
 (0)