docs(sidebar): restructure segment layout

resolves #5171
This commit is contained in:
Jan De Dobbeleer 2024-07-05 12:21:58 +02:00 committed by Jan De Dobbeleer
parent 6aca58eef9
commit f891a26fe9
95 changed files with 185 additions and 118 deletions

View file

@ -154,20 +154,20 @@ Keep that prompt posh everyone!
[migration]: /docs/migrating [migration]: /docs/migrating
[giveaway]: https://twitter.com/jandedobbeleer/status/1511031115569639428?s=20&t=5aZbBZxGXbCBmc-R4WAdIQ [giveaway]: https://twitter.com/jandedobbeleer/status/1511031115569639428?s=20&t=5aZbBZxGXbCBmc-R4WAdIQ
[samerde]: https://twitter.com/samerde [samerde]: https://twitter.com/samerde
[project]: /docs/segments/project [project]: /docs/segments/system/project
[git]: /docs/segments/git [git]: /docs/segments/scm/git
[python]: /docs/segments/python [python]: /docs/segments/languages/python
[shell]: /docs/segments/shell [shell]: /docs/segments/system/shell
[nu]: https://www.nushell.sh [nu]: https://www.nushell.sh
[git-status]: https://git-scm.com/docs/git-status#Documentation/git-status.txt--ultmodegt [git-status]: https://git-scm.com/docs/git-status#Documentation/git-status.txt--ultmodegt
[cargo]: https://crates.io [cargo]: https://crates.io
[poetry]: https://python-poetry.org [poetry]: https://python-poetry.org
[php]: https://getcomposer.org [php]: https://getcomposer.org
[nuspec]: https://docs.microsoft.com/en-us/nuget/reference/nuspec [nuspec]: https://docs.microsoft.com/en-us/nuget/reference/nuspec
[battery]: /docs/segments/battery [battery]: /docs/segments/system/battery
[winget]: https://docs.microsoft.com/en-us/windows/package-manager/winget/ [winget]: https://docs.microsoft.com/en-us/windows/package-manager/winget/
[dotnet]: /docs/segments/dotnet [dotnet]: /docs/segments/languages/dotnet
[iterm]: /docs/segments/iterm [iterm]: /docs/segments/system/iterm
[memory]: /docs/segments/memory [memory]: /docs/segments/system/memory
[exit]: /docs/segments/exit [exit]: /docs/segments/system/status
[path]: /docs/segments/path [path]: /docs/segments/system/path

View file

@ -263,10 +263,10 @@ cycle always gets precedence over everything else.
[hexcolors]: https://htmlcolorcodes.com/color-chart/material-design-color-chart/ [hexcolors]: https://htmlcolorcodes.com/color-chart/material-design-color-chart/
[ansicolors]: https://htmlcolorcodes.com/color-chart/material-design-color-chart/ [ansicolors]: https://htmlcolorcodes.com/color-chart/material-design-color-chart/
[git]: /docs/segments/git [git]: /docs/segments/scm//git
[battery]: /docs/segments/battery [battery]: /docs/segments/system/battery
[template-properties]: /docs/configuration/templates#global-properties [template-properties]: /docs/configuration/templates#global-properties
[aws]: /docs/segments/aws [aws]: /docs/segments/cloud/aws
[go-text-template]: https://golang.org/pkg/text/template/ [go-text-template]: https://golang.org/pkg/text/template/
[sprig]: https://masterminds.github.io/sprig/ [sprig]: https://masterminds.github.io/sprig/
[templates]: templates.mdx [templates]: templates.mdx

View file

@ -184,7 +184,7 @@ of a shell, it will not disable in the others.
To list the currently toggled segments, use `oh-my-posh get toggles`. To list the currently toggled segments, use `oh-my-posh get toggles`.
[segments]: /docs/segments/angular [segments]: /docs/segments/cli/angular
[properties]: #properties [properties]: #properties
[style]: #style [style]: #style
[colors]: /docs/configuration/colors [colors]: /docs/configuration/colors

View file

@ -266,8 +266,8 @@ This can be used in templates and icons/text inside your config.
[go-text-template]: https://pkg.go.dev/text/template [go-text-template]: https://pkg.go.dev/text/template
[sprig]: https://masterminds.github.io/sprig/ [sprig]: https://masterminds.github.io/sprig/
[glob]: https://pkg.go.dev/path/filepath#Glob [glob]: https://pkg.go.dev/path/filepath#Glob
[git]: /docs/segments/git [git]: /docs/segments/scm/git
[status]: /docs/segments/status [status]: /docs/segments/system/status
[templates]: /docs/configuration/segment [templates]: /docs/configuration/segment
[regexpms]: https://pkg.go.dev/regexp#Regexp.MatchString [regexpms]: https://pkg.go.dev/regexp#Regexp.MatchString
[regexpra]: https://pkg.go.dev/regexp#Regexp.ReplaceAllString [regexpra]: https://pkg.go.dev/regexp#Regexp.ReplaceAllString

View file

@ -6,7 +6,7 @@ sidebar_label: Flutter
## What ## What
Display the currently active flutter version. Display the currently active [flutter] version.
## Sample Configuration ## Sample Configuration
@ -59,3 +59,4 @@ import Config from "@site/src/components/Config.js";
[go-text-template]: https://golang.org/pkg/text/template/ [go-text-template]: https://golang.org/pkg/text/template/
[templates]: /docs/configuration/templates [templates]: /docs/configuration/templates
[flutter]: https://flutter.dev/

View file

@ -8,10 +8,6 @@ sidebar_label: Terraform
Display the currently active Terraform Workspace name. Display the currently active Terraform Workspace name.
:::caution
This requires a terraform binary in your PATH and will only show in directories that contain a `.terraform` subdirectory.
:::
## Sample Configuration ## Sample Configuration
import Config from '@site/src/components/Config.js'; import Config from '@site/src/components/Config.js';

View file

@ -6,7 +6,7 @@ sidebar_label: Umbraco
## What ## What
Display current Umbraco Version if found inside the current working directory. Display current [Umbraco] Version if found inside the current working directory.
The segment will only show based on the following logic The segment will only show based on the following logic
* The current folder contains the folder named umbraco * The current folder contains the folder named umbraco
@ -54,3 +54,7 @@ import Config from '@site/src/components/Config.js';
| -------------- | --------- | ------------------------------------------------------------------------------------------------------------------- | | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------- |
| `.Modern` | `boolean` | a boolean to detemine if this is modern Umbraco V9+ using modern .NET or if its legacy Umbraco using .NET Framework | | `.Modern` | `boolean` | a boolean to detemine if this is modern Umbraco V9+ using modern .NET or if its legacy Umbraco using .NET Framework |
| `.Version` | `string` | the version of umbraco found | | `.Version` | `string` | the version of umbraco found |
[go-text-template]: https://golang.org/pkg/text/template/
[templates]: /docs/configuration/templates
[Umbraco]: https://umbraco.com/

View file

@ -6,7 +6,7 @@ sidebar_label: XMake
## What ## What
Display the currently active xmake version. Display the currently active [xmake] version.
## Sample Configuration ## Sample Configuration
@ -58,3 +58,4 @@ import Config from "@site/src/components/Config.js";
[go-text-template]: https://golang.org/pkg/text/template/ [go-text-template]: https://golang.org/pkg/text/template/
[templates]: configuration/templates.mdx [templates]: configuration/templates.mdx
[xmake]: https://xmake.io/

View file

@ -1,7 +1,7 @@
--- ---
id: azd id: azd
title: Azure Developer CLI title: Azure Developer CLI
sidebar_label: azd sidebar_label: Azure Dev CLI
--- ---
## What ## What

View file

@ -6,7 +6,7 @@ sidebar_label: Sitecore
## What ## What
Display current Sitecore environment. Will not be active when sitecore.json and user.json don't exist. Display current [Sitecore] environment. Will not be active when sitecore.json and user.json don't exist.
## Sample Configuration ## Sample Configuration
@ -42,3 +42,7 @@ Display current Sitecore environment. Will not be active when sitecore.json and
| -------------- | -------- | ---------------------------------------- | | -------------- | -------- | ---------------------------------------- |
| `EndpointName` | `string` | name of the current Sitecore environment | | `EndpointName` | `string` | name of the current Sitecore environment |
| `CmHost` | `string` | host of the current Sitecore environment | | `CmHost` | `string` | host of the current Sitecore environment |
[go-text-template]: https://golang.org/pkg/text/template/
[templates]: /docs/configuration/templates
[Sitecore]: https://www.sitecore.com/

View file

@ -6,7 +6,7 @@ sidebar_label: Crystal
## What ## What
Display the currently active crystal version. Display the currently active [crystal] version.
## Sample Configuration ## Sample Configuration
@ -59,3 +59,4 @@ import Config from "@site/src/components/Config.js";
[go-text-template]: https://golang.org/pkg/text/template/ [go-text-template]: https://golang.org/pkg/text/template/
[templates]: /docs/configuration/templates [templates]: /docs/configuration/templates
[crystal]: https://crystal-lang.org/

View file

@ -6,7 +6,7 @@ sidebar_label: Elixir
## What ## What
Display the currently active elixir version. Display the currently active [elixir] version.
## Sample Configuration ## Sample Configuration
@ -58,3 +58,4 @@ import Config from "@site/src/components/Config.js";
[go-text-template]: https://golang.org/pkg/text/template/ [go-text-template]: https://golang.org/pkg/text/template/
[templates]: /docs/configuration/templates [templates]: /docs/configuration/templates
[elixir]: https://elixir-lang.org/

View file

@ -6,7 +6,7 @@ sidebar_label: Ocaml
## What ## What
Display the currently active OCaml version. Display the currently active [OCaml] version.
## Sample Configuration ## Sample Configuration
@ -58,3 +58,4 @@ import Config from "@site/src/components/Config.js";
[go-text-template]: https://golang.org/pkg/text/template/ [go-text-template]: https://golang.org/pkg/text/template/
[templates]: /docs/configuration/templates [templates]: /docs/configuration/templates
[OCaml]: https://ocaml.org/

View file

@ -6,7 +6,7 @@ sidebar_label: Vala
## What ## What
Display the currently active vala version. Display the currently active [vala] version.
## Sample Configuration ## Sample Configuration
@ -58,3 +58,4 @@ import Config from "@site/src/components/Config.js";
[go-text-template]: https://golang.org/pkg/text/template/ [go-text-template]: https://golang.org/pkg/text/template/
[templates]: /docs/configuration/templates [templates]: /docs/configuration/templates
[vala]: https://vala.dev/

View file

@ -51,95 +51,152 @@ module.exports = {
label: "🌟 Segments", label: "🌟 Segments",
collapsed: true, collapsed: true,
items: [ items: [
"segments/angular", {
"segments/argocd", type: "category",
"segments/aws", label: "🧰 CLI",
"segments/az", collapsed: true,
"segments/azd", items: [
"segments/azfunc", "segments/cli/angular",
"segments/battery", "segments/cli/argocd",
"segments/bazel", "segments/cli/bazel",
"segments/brewfather", "segments/cli/buf",
"segments/buf", "segments/cli/bun",
"segments/bun", "segments/cli/cmake",
"segments/carbonintensity", "segments/cli/deno",
"segments/cds", "segments/cli/docker",
"segments/cf", "segments/cli/firebase",
"segments/cftarget", "segments/cli/flutter",
"segments/cmake", "segments/cli/gitversion",
"segments/command", "segments/cli/helm",
"segments/connection", "segments/cli/kubectl",
"segments/crystal", "segments/cli/nbgv",
"segments/dart", "segments/cli/npm",
"segments/deno", "segments/cli/nx",
"segments/docker", "segments/cli/pnpm",
"segments/dotnet", "segments/cli/quasar",
"segments/elixir", "segments/cli/react",
"segments/executiontime", "segments/cli/talosctl",
"segments/flutter", "segments/cli/terraform",
"segments/fossil", "segments/cli/ui5tooling",
"segments/gcp", "segments/cli/umbraco",
"segments/firebase", "segments/cli/unity",
"segments/git", "segments/cli/xmake",
"segments/gitversion", "segments/cli/yarn",
"segments/golang", ]
"segments/haskell", },
"segments/helm", {
"segments/ipify", type: "category",
"segments/java", label: "☁️ Cloud",
"segments/julia", collapsed: true,
"segments/kotlin", items: [
"segments/kubectl", "segments/cloud/aws",
"segments/lastfm", "segments/cloud/az",
"segments/lua", "segments/cloud/azd",
"segments/mercurial", "segments/cloud/azfunc",
"segments/nbgv", "segments/cloud/cds",
"segments/nightscout", "segments/cloud/cf",
"segments/node", "segments/cloud/cftarget",
"segments/npm", "segments/cloud/gcp",
"segments/nx", "segments/cloud/pulumi",
"segments/ocaml", "segments/cloud/sitecore",
"segments/os", ]
"segments/owm", },
"segments/path", {
"segments/perl", type: "category",
"segments/php", label: "💖 Health",
"segments/plastic", collapsed: true,
"segments/pnpm", items: [
"segments/project", "segments/health/nightscout",
"segments/pulumi", "segments/health/strava",
"segments/python", "segments/health/withings",
"segments/quasar", ]
"segments/r", },
"segments/react", {
"segments/root", type: "category",
"segments/ruby", label: "✍️ Languages",
"segments/rust", collapsed: true,
"segments/sapling", items: [
"segments/session", "segments/languages/crystal",
"segments/shell", "segments/languages/dart",
"segments/sitecore", "segments/languages/dotnet",
"segments/spotify", "segments/languages/elixir",
"segments/status", "segments/languages/golang",
"segments/strava", "segments/languages/haskell",
"segments/svn", "segments/languages/java",
"segments/swift", "segments/languages/julia",
"segments/sysinfo", "segments/languages/kotlin",
"segments/talosctl", "segments/languages/lua",
"segments/terraform", "segments/languages/node",
"segments/text", "segments/languages/ocaml",
"segments/time", "segments/languages/perl",
"segments/ui5tooling", "segments/languages/php",
"segments/umbraco", "segments/languages/python",
"segments/unity", "segments/languages/r",
"segments/upgrade", "segments/languages/ruby",
"segments/vala", "segments/languages/rust",
"segments/wakatime", "segments/languages/swift",
"segments/withings", "segments/languages/vala",
"segments/winreg", ]
"segments/xmake", },
"segments/yarn", {
"segments/ytm", type: "category",
label: "🎧 Music",
collapsed: true,
items: [
"segments/music/lastfm",
"segments/music/spotify",
"segments/music/ytm",
]
},
{
type: "category",
label: "🧑‍💻 Source control",
collapsed: true,
items: [
"segments/scm/fossil",
"segments/scm/git",
"segments/scm/mercurial",
"segments/scm/plastic",
"segments/scm/sapling",
"segments/scm/svn",
]
},
{
type: "category",
label: "🖥️ System",
collapsed: true,
items: [
"segments/system/battery",
"segments/system/command",
"segments/system/connection",
"segments/system/executiontime",
"segments/system/os",
"segments/system/path",
"segments/system/project",
"segments/system/root",
"segments/system/session",
"segments/system/shell",
"segments/system/status",
"segments/system/sysinfo",
"segments/system/text",
"segments/system/time",
"segments/system/upgrade",
"segments/system/winreg",
]
},
{
type: "category",
label: "🌐 Web",
collapsed: true,
items: [
"segments/web/brewfather",
"segments/web/carbonintensity",
"segments/web/ipify",
"segments/web/nba",
"segments/web/owm",
"segments/web/wakatime",
]
},
], ],
}, },
{ {