mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-21 02:55:37 -08:00
docs(windows): simplify installation guide
This commit is contained in:
parent
a2be3faefe
commit
64a9e65e74
|
@ -8,7 +8,7 @@ functionality, going through the additional steps below will help you get starte
|
||||||
We downloaded all the themes and set `jandedobbeleer.omp.json` as the one to use.
|
We downloaded all the themes and set `jandedobbeleer.omp.json` as the one to use.
|
||||||
However, there are [a lot more][themes] to be discovered and maybe there are some you like better.
|
However, there are [a lot more][themes] to be discovered and maybe there are some you like better.
|
||||||
|
|
||||||
## Override the theme settings
|
### Override the theme settings
|
||||||
|
|
||||||
Maybe there's a theme you like, but you don't fancy the colors. Or, maybe there's a segment you
|
Maybe there's a theme you like, but you don't fancy the colors. Or, maybe there's a segment you
|
||||||
want to tweak/add, or replace some of the icons with a different one. Whatever the case, read through all
|
want to tweak/add, or replace some of the icons with a different one. Whatever the case, read through all
|
||||||
|
|
|
@ -10,7 +10,7 @@ brew install oh-my-posh
|
||||||
This installs two things:
|
This installs two things:
|
||||||
|
|
||||||
- `oh-my-posh` - Executable, added to `/usr/local/bin`
|
- `oh-my-posh` - Executable, added to `/usr/local/bin`
|
||||||
- `themes` - The latest Oh My Posh themes
|
- `themes` - The latest Oh My Posh [themes][themes]
|
||||||
|
|
||||||
If you want to use a standard theme, you can find them in `$(brew --prefix oh-my-posh)/themes`, referencing them as such
|
If you want to use a standard theme, you can find them in `$(brew --prefix oh-my-posh)/themes`, referencing them as such
|
||||||
will always keep them compatible with the binary when updating Oh My Posh.
|
will always keep them compatible with the binary when updating Oh My Posh.
|
||||||
|
@ -33,3 +33,4 @@ The guides below assume you copied the theme called `jandedobbeleer.omp.json` to
|
||||||
When using brew, you can find this one at `$(brew --prefix oh-my-posh)/themes/jandedobbeleer.omp.json`.
|
When using brew, you can find this one at `$(brew --prefix oh-my-posh)/themes/jandedobbeleer.omp.json`.
|
||||||
|
|
||||||
[brew]: https://brew.sh
|
[brew]: https://brew.sh
|
||||||
|
[themes]: https://ohmyposh.dev/docs/themes
|
||||||
|
|
|
@ -2,8 +2,7 @@ import Tabs from "@theme/Tabs";
|
||||||
import TabItem from "@theme/TabItem";
|
import TabItem from "@theme/TabItem";
|
||||||
|
|
||||||
:::tip
|
:::tip
|
||||||
If you have no idea which shell you're currently using, Oh My Posh has a utility switch that can tell that to you (not relevant
|
If you have no idea which shell you're currently using, Oh My Posh has a utility switch that can tell that to you.
|
||||||
for the Powershell module).
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -42,19 +42,19 @@ scoop install https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/downl
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="powershell">
|
<TabItem value="powershell">
|
||||||
|
|
||||||
:::warning
|
|
||||||
The PowerShell module only installs the Oh My Posh execuatble inside PowerShell, to use Oh My posh outside of PowerShell,
|
|
||||||
add the following folder to your `$PATH`:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
"$((Get-Item (Get-Module oh-my-posh).ModuleBase).Parent.FullName)"
|
|
||||||
```
|
|
||||||
:::
|
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
Install-Module oh-my-posh -Scope CurrentUser
|
Install-Module oh-my-posh -Scope CurrentUser
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::warning
|
||||||
|
The PowerShell module only installs the Oh My Posh executable inside PowerShell, to use Oh My posh outside of PowerShell
|
||||||
|
(bash, cmd, ...), add the following folder to your `$PATH`:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$env:POSH_PATH
|
||||||
|
```
|
||||||
|
:::
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="chocolatey">
|
<TabItem value="chocolatey">
|
||||||
|
|
||||||
|
@ -71,10 +71,10 @@ choco install oh-my-posh
|
||||||
|
|
||||||
This installs a couple of things:
|
This installs a couple of things:
|
||||||
|
|
||||||
- `oh-my-posh.exe` - Windows executable, added to your `$PATH`
|
- `oh-my-posh.exe` - Windows executable
|
||||||
- `themes` - The latest Oh My Posh [themes][themes]
|
- `themes` - The latest Oh My Posh [themes][themes]
|
||||||
|
|
||||||
For the `$PATH` to reload, a reboot is advised.
|
For the `$PATH` to reload, a restart of your shell session is advised.
|
||||||
|
|
||||||
## Update
|
## Update
|
||||||
|
|
||||||
|
@ -146,8 +146,8 @@ when setting the prompt using the `--config` flag.
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="powershell">
|
<TabItem value="powershell">
|
||||||
|
|
||||||
You can find the themes PowerShell installs inside the `"$((Get-Module oh-my-posh).ModuleBase)\themes\"` folder.
|
You can find the themes PowerShell installs inside the `$env:POSH_THEMES_PATH` folder.
|
||||||
To use `jandedobbeleer.omp.json` for example, you can refer to it using `"$((Get-Module oh-my-posh).ModuleBase)\themes\jandedobbeleer.omp.json"`
|
To use `jandedobbeleer.omp.json` for example, you can refer to it using `"$env:POSH_THEMES_PATH\jandedobbeleer.omp.json"`
|
||||||
when setting the prompt using the `--config` flag.
|
when setting the prompt using the `--config` flag.
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
@ -161,39 +161,6 @@ when setting the prompt using the `--config` flag.
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
The guides below assume you copied the theme called `jandedobbeleer.omp.json` to your user's `$HOME` folder.
|
The guides below assume you copied the theme called `jandedobbeleer.omp.json` to your user's `$HOME` folder.
|
||||||
Based on the installation method used, you can find this theme at the following location:
|
|
||||||
|
|
||||||
<Tabs
|
|
||||||
defaultValue="winget"
|
|
||||||
groupId="install"
|
|
||||||
values={[
|
|
||||||
{ label: 'winget', value: 'winget', },
|
|
||||||
{ label: 'scoop', value: 'scoop', },
|
|
||||||
{ label: 'powershell', value: 'powershell', },
|
|
||||||
{ label: 'chocolatey', value: 'chocolatey'},
|
|
||||||
]
|
|
||||||
}>
|
|
||||||
<TabItem value="winget">
|
|
||||||
|
|
||||||
`~\AppData\Local\Programs\oh-my-posh\themes\jandedobbeleer.omp.json`
|
|
||||||
|
|
||||||
</TabItem>
|
|
||||||
<TabItem value="scoop">
|
|
||||||
|
|
||||||
`"$(scoop prefix oh-my-posh)\themes\jandedobbeleer.omp.json"`
|
|
||||||
|
|
||||||
</TabItem>
|
|
||||||
<TabItem value="powershell">
|
|
||||||
|
|
||||||
`"$((Get-Module oh-my-posh).ModuleBase)\themes\jandedobbeleer.omp.json"`
|
|
||||||
|
|
||||||
</TabItem>
|
|
||||||
<TabItem value="chocolatey">
|
|
||||||
|
|
||||||
`~\AppData\Local\Programs\oh-my-posh\themes\jandedobbeleer.omp.json`
|
|
||||||
|
|
||||||
</TabItem>
|
|
||||||
</Tabs>
|
|
||||||
|
|
||||||
:::caution
|
:::caution
|
||||||
When using oh-my-posh inside the WSL, make sure to follow the [linux](linux) installation guide.
|
When using oh-my-posh inside the WSL, make sure to follow the [linux](linux) installation guide.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
$artifactPath = "$((Get-Item $MyInvocation.MyCommand.ScriptBlock.Module.ModuleBase).Parent.FullName)"
|
$env:POSH_PATH = "$((Get-Item $MyInvocation.MyCommand.ScriptBlock.Module.ModuleBase).Parent.FullName)"
|
||||||
$env:POSH_THEMES_PATH = $artifactPath + "/themes"
|
$env:POSH_THEMES_PATH = $env:POSH_PATH + "/themes"
|
||||||
$env:PATH = "$artifactPath;$env:PATH"
|
$env:PATH = "$env:POSH_PATH;$env:PATH"
|
||||||
|
|
||||||
function Get-PoshDownloadUrl {
|
function Get-PoshDownloadUrl {
|
||||||
param(
|
param(
|
||||||
|
|
Loading…
Reference in a new issue