Files
OpenTerminal/src/main/windowChrome.ts
T
Bill a9acdbe500 Initial commit: OpenTerminal v0.1.0
Open-source terminal app (local + SSH): split panes, themes, SFTP,
server monitoring, broadcast input, ZMODEM, system tray, single instance.
Electron + React + TypeScript. MIT License.
2026-09-07 16:15:50 +08:00

17 lines
645 B
TypeScript

import { BrowserWindow } from 'electron'
import type { AppSettings } from '@shared/settings'
import { getThemeById } from '@shared/theme'
/** Title bar overlay + window background follow the active terminal theme. */
export function applyWindowChrome(settings: AppSettings): void {
const theme = getThemeById(settings.terminal.themeId, settings.customThemes)
const bg = theme.colors.background
const fg = theme.colors.foreground
for (const win of BrowserWindow.getAllWindows()) {
win.setBackgroundColor(bg)
if (process.platform === 'win32') {
win.setTitleBarOverlay({ color: bg, symbolColor: fg, height: 36 })
}
}
}