summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/components
diff options
context:
space:
mode:
authorLuke Parker <[email protected]>2026-04-19 19:46:34 +1000
committerGitHub <[email protected]>2026-04-19 19:46:34 +1000
commit10bd044c55600408f2bca606bb6ce37c88b459f9 (patch)
tree21142e75094316dd82389f7c32d299f0491d472e /packages/app/src/components
parentc09bcfe5314ff4d78d169a9a373450d19df9b407 (diff)
downloadopencode-10bd044c55600408f2bca606bb6ce37c88b459f9.tar.gz
opencode-10bd044c55600408f2bca606bb6ce37c88b459f9.zip
feat: add terminal font settings and built-in Nerd Font (#23391)
Diffstat (limited to 'packages/app/src/components')
-rw-r--r--packages/app/src/components/settings-general.tsx27
-rw-r--r--packages/app/src/components/terminal.tsx6
2 files changed, 30 insertions, 3 deletions
diff --git a/packages/app/src/components/settings-general.tsx b/packages/app/src/components/settings-general.tsx
index c380fb69b..490bc2e48 100644
--- a/packages/app/src/components/settings-general.tsx
+++ b/packages/app/src/components/settings-general.tsx
@@ -19,6 +19,9 @@ import {
sansDefault,
sansFontFamily,
sansInput,
+ terminalDefault,
+ terminalFontFamily,
+ terminalInput,
useSettings,
} from "@/context/settings"
import { decode64 } from "@/utils/base64"
@@ -181,6 +184,7 @@ export const SettingsGeneral: Component = () => {
const soundOptions = [noneSound, ...SOUND_OPTIONS]
const mono = () => monoInput(settings.appearance.font())
const sans = () => sansInput(settings.appearance.uiFont())
+ const terminal = () => terminalInput(settings.appearance.terminalFont())
const soundSelectProps = (
enabled: () => boolean,
@@ -451,6 +455,29 @@ export const SettingsGeneral: Component = () => {
/>
</div>
</SettingsRow>
+
+ <SettingsRow
+ title={language.t("settings.general.row.terminalFont.title")}
+ description={language.t("settings.general.row.terminalFont.description")}
+ >
+ <div class="w-full sm:w-[220px]">
+ <TextField
+ data-action="settings-terminal-font"
+ label={language.t("settings.general.row.terminalFont.title")}
+ hideLabel
+ type="text"
+ value={terminal()}
+ onChange={(value) => settings.appearance.setTerminalFont(value)}
+ placeholder={terminalDefault}
+ spellcheck={false}
+ autocorrect="off"
+ autocomplete="off"
+ autocapitalize="off"
+ class="text-12-regular"
+ style={{ "font-family": terminalFontFamily(settings.appearance.terminalFont()) }}
+ />
+ </div>
+ </SettingsRow>
</SettingsList>
</div>
)
diff --git a/packages/app/src/components/terminal.tsx b/packages/app/src/components/terminal.tsx
index 57e91d6d3..ff5ff9dad 100644
--- a/packages/app/src/components/terminal.tsx
+++ b/packages/app/src/components/terminal.tsx
@@ -11,7 +11,7 @@ import { useLanguage } from "@/context/language"
import { usePlatform } from "@/context/platform"
import { useSDK } from "@/context/sdk"
import { useServer } from "@/context/server"
-import { monoFontFamily, useSettings } from "@/context/settings"
+import { terminalFontFamily, useSettings } from "@/context/settings"
import type { LocalPTY } from "@/context/terminal"
import { disposeIfDisposable, getHoveredLinkText, setOptionIfSupported } from "@/utils/runtime-adapters"
import { terminalWriter } from "@/utils/terminal-writer"
@@ -300,7 +300,7 @@ export const Terminal = (props: TerminalProps) => {
})
createEffect(() => {
- const font = monoFontFamily(settings.appearance.font())
+ const font = terminalFontFamily(settings.appearance.terminalFont())
if (!term) return
setOptionIfSupported(term, "fontFamily", font)
scheduleFit()
@@ -360,7 +360,7 @@ export const Terminal = (props: TerminalProps) => {
cols: restoreSize?.cols,
rows: restoreSize?.rows,
fontSize: 14,
- fontFamily: monoFontFamily(settings.appearance.font()),
+ fontFamily: terminalFontFamily(settings.appearance.terminalFont()),
allowTransparency: false,
convertEol: false,
theme: terminalColors(),