feat(desktop): add configurable terminal font family (terminal.font_family in config.yaml)
Adds a new config option terminal.font_family that lets users customize the
CSS font-family for the desktop app's embedded xterm.js terminal.
Previously the font was hardcoded in use-terminal-session.ts:
'JetBrains Mono', 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace
Now the value from config.yaml (terminal.font_family) is threaded through:
useHermesConfig → PersistentTerminal → TerminalTab → useTerminalSession
When font_family is empty or unset (default), the built-in fallback is used,
preserving backward compatibility. Users with Nerd Fonts installed (e.g.
CaskaydiaCoveNerdFont) can now set:
terminal:
font_family: 'CaskaydiaCoveNerdFont', 'JetBrains Mono', monospace
Closes: #terminal-font-config
This commit is contained in:
@@ -112,7 +112,7 @@ export function useHermesConfig({ activeSessionIdRef }: HermesConfigOptions) {
|
||||
applyVoiceStopPhraseFromConfig(config)
|
||||
applyThinkingSoundFromConfig(config)
|
||||
} catch {
|
||||
// Config is nice-to-have; chat still works without it.
|
||||
// Config is nice-to-have; chat still works without it.
|
||||
}
|
||||
},
|
||||
[activeSessionIdRef]
|
||||
|
||||
@@ -411,6 +411,7 @@ export const FIELD_LABELS: Record<string, string> = defineFieldCopy({
|
||||
cwd: 'Working Directory',
|
||||
backend: 'Execution Backend',
|
||||
timeout: 'Command Timeout',
|
||||
fontFamily: 'Terminal Font',
|
||||
persistentShell: 'Persistent Shell',
|
||||
envPassthrough: 'Environment Passthrough',
|
||||
dockerImage: 'Docker Image',
|
||||
@@ -573,6 +574,7 @@ export const FIELD_DESCRIPTIONS: Record<string, string> = defineFieldCopy({
|
||||
},
|
||||
terminal: {
|
||||
cwd: 'Default project folder for tool and terminal work.',
|
||||
fontFamily: 'CSS font-family for the desktop embedded terminal (xterm.js). Set to a Nerd Font name like CaskaydiaCoveNerdFont to render icon glyphs correctly.',
|
||||
persistentShell: 'Keep shell state between commands when the backend supports it.',
|
||||
envPassthrough: 'Environment variables to pass into tool execution.',
|
||||
dockerImage: 'Container image used when the execution backend is Docker.',
|
||||
|
||||
@@ -339,6 +339,7 @@ export interface HermesConfig {
|
||||
}
|
||||
terminal?: {
|
||||
cwd?: string
|
||||
font_family?: string
|
||||
}
|
||||
stt?: {
|
||||
enabled?: boolean
|
||||
|
||||
@@ -239,6 +239,14 @@ DEFAULT_CONFIG = {
|
||||
"backend": "local",
|
||||
"modal_mode": "auto",
|
||||
"cwd": ".", # Use current directory
|
||||
# Terminal font family for the desktop app's embedded xterm.js terminal.
|
||||
# When set (e.g. "'CaskaydiaCoveNerdFont', 'JetBrains Mono', monospace"),
|
||||
# the desktop terminal uses this as the CSS font-family value, with the
|
||||
# built-in default ("'JetBrains Mono', 'Cascadia Code', 'SF Mono', Menlo,
|
||||
# Consolas, monospace") as fallback when the field is empty or unset.
|
||||
# This lets users install a Nerd Font (or any custom font) and configure
|
||||
# it here without patching the built desktop app.
|
||||
"font_family": "",
|
||||
"timeout": 180,
|
||||
# Bounded grace period (seconds) between SIGTERM and an escalated
|
||||
# SIGKILL when terminating a host process tree (browser daemons, etc.).
|
||||
|
||||
Reference in New Issue
Block a user