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.
This commit is contained in:
commit
a9acdbe500
99 files changed
+23940
No files matched your search
@@ -0,0 +1,16 @@
|
||||
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 })
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user