Skip to content

Commit 7f801f9

Browse files
JamBalaya56562JanDeDobbeleer
authored andcommitted
docs(system): polish system segment info
1 parent 23a211a commit 7f801f9

14 files changed

Lines changed: 32 additions & 62 deletions

File tree

src/segments/os.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ func (oi *Os) getDistroIcon(distro string) string {
7474
"mageia": "\uF310",
7575
"manjaro": "\uF312",
7676
"mint": "\U000f08ed",
77+
"neon": "\uf331",
7778
"nixos": "\uF313",
7879
"opensuse": "\uF314",
7980
"opensuse-tumbleweed": "\uF314",
@@ -83,7 +84,6 @@ func (oi *Os) getDistroIcon(distro string) string {
8384
"sabayon": "\uF317",
8485
"slackware": "\uF319",
8586
"ubuntu": "\uF31b",
86-
"neon": "\uf331",
8787
}
8888

8989
if icon, ok := iconMap[distro]; ok {

themes/schema.json

Lines changed: 17 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,24 +1359,6 @@
13591359
"bluetooth"
13601360
],
13611361
"default": "wifi|ethernet"
1362-
},
1363-
"unit": {
1364-
"type": "string",
1365-
"title": "Transfer speed unit",
1366-
"enum": [
1367-
"none",
1368-
"b",
1369-
"bps",
1370-
"K",
1371-
"Kbps",
1372-
"M",
1373-
"Mbps",
1374-
"G",
1375-
"Gbps",
1376-
"T",
1377-
"Tbps"
1378-
],
1379-
"default": "none"
13801362
}
13811363
},
13821364
"additionalProperties": false
@@ -1673,7 +1655,7 @@
16731655
"default": false
16741656
},
16751657
"threshold": {
1676-
"type": "number",
1658+
"type": "integer",
16771659
"title": "Threshold",
16781660
"description": "minimum duration (milliseconds) required to enable this segment",
16791661
"default": 500
@@ -3339,6 +3321,12 @@
33393321
"description": "Custom glyph/text for specific paths",
33403322
"default": {}
33413323
},
3324+
"mapped_locations_enabled": {
3325+
"type": "boolean",
3326+
"title": "Enable the Mapped Locations feature",
3327+
"description": "Replace known locations in the path with the replacements before applying the style.",
3328+
"default": true
3329+
},
33423330
"max_depth": {
33433331
"type": "integer",
33443332
"title": "Maximum Depth",
@@ -3354,12 +3342,6 @@
33543342
"description": "Maximum path width to display for powerlevel style",
33553343
"default": 0
33563344
},
3357-
"mapped_locations_enabled": {
3358-
"type": "boolean",
3359-
"title": "Enable the Mapped Locations feature",
3360-
"description": "Replace known locations in the path with the replacements before applying the style.",
3361-
"default": true
3362-
},
33633345
"mixed_threshold": {
33643346
"type": "integer",
33653347
"title": "Mixed threshold",
@@ -3421,6 +3403,12 @@
34213403
"description": "Display the Cygwin (Linux) style path using cygpath -u $PWD.",
34223404
"default": false
34233405
},
3406+
"display_root": {
3407+
"type": "boolean",
3408+
"title": "Display the root directory (/) on Unix systems",
3409+
"description": "Display the root directory (/) on Unix systems.",
3410+
"default": false
3411+
},
34243412
"dir_length": {
34253413
"type": "integer",
34263414
"title": "Directory Length",
@@ -3656,8 +3644,7 @@
36563644
"description": "Always show the segment",
36573645
"default": false
36583646
}
3659-
},
3660-
"additionalProperties": false
3647+
}
36613648
}
36623649
}
36633650
}
@@ -4021,20 +4008,7 @@
40214008
},
40224009
"then": {
40234010
"title": "Session Segment",
4024-
"description": "https://ohmyposh.dev/docs/segments/system/session",
4025-
"properties": {
4026-
"options": {
4027-
"properties": {
4028-
"ssh_icon": {
4029-
"type": "string",
4030-
"title": "SSH Icon",
4031-
"description": "Text/icon to display first when in an active SSH session",
4032-
"default": "\uf817"
4033-
}
4034-
},
4035-
"additionalProperties": false
4036-
}
4037-
}
4011+
"description": "https://ohmyposh.dev/docs/segments/system/session"
40384012
}
40394013
},
40404014
{
@@ -4158,7 +4132,7 @@
41584132
"type": "string",
41594133
"title": "Status Template",
41604134
"description": "The template to use for the status segment",
4161-
"default": "|"
4135+
"default": "{{ .Code }}"
41624136
},
41634137
"status_separator": {
41644138
"type": "string",
@@ -4571,7 +4545,7 @@
45714545
"properties": {
45724546
"cache_duration": {
45734547
"$ref": "#/definitions/cache_duration",
4574-
"default": "none"
4548+
"default": "168h"
45754549
}
45764550
},
45774551
"additionalProperties": false

website/docs/segments/system/battery.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import Config from "@site/src/components/Config.js";
5353
:::note default template
5454

5555
```template
56-
{{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}
56+
{{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}
5757
```
5858

5959
:::
@@ -73,6 +73,4 @@ import Config from "@site/src/components/Config.js";
7373
| `.Error` | `string` | the error in case fetching the battery information failed |
7474
| `.Icon` | `string` | the icon based on the battery state |
7575

76-
[colors]: /docs/configuration/colors
77-
[battery]: https://github.com/distatus/battery/blob/master/battery.go#L78
7876
[templates]: /docs/configuration/templates

website/docs/segments/system/connection.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Connection
44
sidebar_label: Connection
55
---
66

7-
## Connection
7+
## What
88

99
Show details about the currently connected network.
1010

@@ -35,7 +35,7 @@ import Config from '@site/src/components/Config.js';
3535
:::note default template
3636

3737
```template
38-
{{ if eq .Type \"wifi\"}}\uf1eb{{ else if eq .Type \"ethernet\"}}\ueba9{{ end }}
38+
{{ if eq .Type \"wifi\"}}\uf1eb{{ else if eq .Type \"ethernet\"}}\ueba9{{ end }}
3939
```
4040

4141
:::

website/docs/segments/system/executiontime.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import Config from "@site/src/components/Config.js";
3333
| Name | Type | Default | Description |
3434
| ---------------- | :-------: | :------: | --------------------------------------------------------------- |
3535
| `always_enabled` | `boolean` | `false` | always show the duration |
36-
| `threshold` | `number` | `500` | minimum duration (milliseconds) required to enable this segment |
36+
| `threshold` | `int` | `500` | minimum duration (milliseconds) required to enable this segment |
3737
| `style` | `enum` | `austin` | one of the available format options |
3838

3939
### Style
@@ -57,7 +57,7 @@ Style specifies the format in which the time will be displayed. The table below
5757
:::note default template
5858

5959
```template
60-
{{ .FormattedMs }}
60+
{{ .FormattedMs }}
6161
```
6262

6363
:::

website/docs/segments/system/os.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import Config from "@site/src/components/Config.js";
7070
:::note default template
7171

7272
```template
73-
{{ if .WSL }}WSL at {{ end }}{{.Icon}}
73+
{{ if .WSL }}WSL at {{ end }}{{.Icon}}
7474
```
7575

7676
:::

website/docs/segments/system/path.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ number of folders specified by `full_length_dirs`, which will be displayed in fu
187187
:::note default template
188188

189189
```template
190-
{{ .Path }}
190+
{{ .Path }}
191191
```
192192

193193
:::

website/docs/segments/system/root.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import Config from '@site/src/components/Config.js';
2626
:::note default template
2727

2828
``` template
29-
\uF0E7
29+
\uF0E7
3030
```
3131

3232
:::

website/docs/segments/system/session.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import Config from '@site/src/components/Config.js';
2727
:::note default template
2828

2929
```template
30-
{{ if .SSHSession }}\ueba9 {{ end }}{{ .UserName }}@{{ .HostName }}
30+
{{ if .SSHSession }}\ueba9 {{ end }}{{ .UserName }}@{{ .HostName }}
3131
```
3232

3333
:::

website/docs/segments/system/status.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import Config from "@site/src/components/Config.js";
4242
:::note default template
4343

4444
```template
45-
{{ .String }}
45+
{{ .String }}
4646
```
4747

4848
:::

0 commit comments

Comments
 (0)