oh-my-posh/website/docs/segments/winreg.md

55 lines
1.1 KiB
Markdown
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:
- String
- DWORD (displayed in upper-case 0x hex)
- QWORD (displayed in upper-case 0x hex)
2021-11-24 04:47:30 -08:00
## Sample Configuration
```json
{
"type": "winreg",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#ffffff",
"background": "#444444",
2022-03-27 01:12:47 -07:00
"template":" \uE62A {{ .Value }}",
2021-11-24 04:47:30 -08:00
"properties": {
"path": "HKLM\\software\\microsoft\\windows nt\\currentversion\\buildlab",
2022-03-27 01:12:47 -07:00
"fallback":"unknown"
2021-11-24 04:47:30 -08:00
}
},
```
## Properties
2022-01-22 10:46:56 -08:00
- 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
{{ .Value }}
```
:::
### Properties
2021-11-24 04:47:30 -08:00
- .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