oh-my-posh/website/docs/segments/system/winreg.mdx

60 lines
1.9 KiB
Plaintext
Raw Normal View History

2021-11-24 04:47:30 -08:00
---
id: winreg
title: Windows Registry Key Query
sidebar_label: Windows Registry Key Query
---
## What
Display the content of the requested Windows registry key.
Supported registry key types:
2022-06-01 00:50:20 -07:00
- `SZ` (displayed as string value)
- `EXPAND_SZ` (displayed as string value)
- `BINARY` (displayed as string value)
- `DWORD` (displayed in upper-case 0x hex)
- `QWORD` (displayed in upper-case 0x hex)
2021-11-24 04:47:30 -08:00
## Sample Configuration
2023-03-31 11:55:36 -07:00
import Config from '@site/src/components/Config.js';
<Config data={{
"type": "winreg",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#444444",
"template":" \uE62A {{ .Value }}",
"properties": {
"path": "HKLM\\software\\microsoft\\windows nt\\currentversion\\buildlab",
"fallback":"unknown"
}
}}/>
2021-11-24 04:47:30 -08:00
## Properties
| Name | Type | Default | Description |
| ---------- | :------: | :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `path` | `string` | | registry path to the desired key using backslashes and with a valid root HKEY name. Ending path with \ will get the (Default) key from that path |
| `fallback` | `string` | | the value to fall back to if no entry is found |
2021-11-24 04:47:30 -08:00
2022-02-01 03:10:46 -08:00
## Template ([info][templates])
:::note default template
```template
2022-02-01 03:10:46 -08:00
{{ .Value }}
```
:::
### Properties
2021-11-24 04:47:30 -08:00
| Name | Type | Description |
| ------ | -------- | --------------------------------------------------- |
| .Value | `string` | The result of your query, or fallback if not found. |
2021-11-24 04:47:30 -08:00
2022-04-20 09:43:59 -07:00
[templates]: /docs/configuration/templates