Open-source terminal app (local + SSH): split panes, themes, SFTP, server monitoring, broadcast input, ZMODEM, system tray, single instance. Electron + React + TypeScript. MIT License.
17 lines
645 B
TypeScript
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 })
|
|
}
|
|
}
|
|
}
|