Something went wrong. Try again.
A GPU terminal emulator for Wayland and Windows on libghostty-vt, drawing with Vulkan, running a program on a pty or a serial port.
Something went wrong. Try again.
123456789101112131415161718192021222324252627// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us>// SPDX-License-Identifier: MIT
//! Whether the user chose dark or light for programs, in Settings'//! Personalization > Colors: what the portal reports as the color scheme//! and the platform gives the frames Windows draws, so that the two agree.
const win32 = @import("win32").everything;
const L = @import("std").unicode.utf8ToUtf16LeStringLiteral;
/// True for dark; light when the user never chose, as Windows has it.pub fn dark() bool { var light: u32 = 1; var size: u32 = @sizeOf(u32); const err = win32.RegGetValueW( win32.HKEY_CURRENT_USER, L("Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"), L("AppsUseLightTheme"), win32.RRF_RT_REG_DWORD, null, &light, &size, ); return err == .NO_ERROR and light == 0;}