Back to Oh My Posh

Windows Registry Key Query

website/docs/segments/system/winreg.mdx

29.12.01.8 KB
Original Source

What

Display the content of the requested Windows registry key.

Supported registry key types:

  • 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)

Sample Configuration

import Config from "@site/src/components/Config.js";

<Config data={{ type: "winreg", style: "powerline", powerline_symbol: "\uE0B0", foreground: "#ffffff", background: "#444444", template: " \uE62A {{ .Value }}", options: { path: "HKLM\software\microsoft\windows nt\currentversion\buildlab", fallback: "unknown", }, }} />

Options

NameTypeDefaultDescription
pathstringregistry 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
fallbackstringthe value to fall back to if no entry is found

Template (info)

:::note default template

template
 {{ .Value }}

:::

Properties

NameTypeDescription
.ValuestringThe result of your query, or fallback if not found.