@@ -39,6 +39,7 @@ export interface Settings {
3939 fontSize : number
4040 mono : string
4141 sans : string
42+ terminal : string
4243 }
4344 keybinds : Record < string , string >
4445 permissions : {
@@ -50,13 +51,16 @@ export interface Settings {
5051
5152export const monoDefault = "System Mono"
5253export const sansDefault = "System Sans"
54+ export const terminalDefault = "JetBrainsMono Nerd Font Mono"
5355
5456const monoFallback =
5557 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
5658const sansFallback = 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
59+ const terminalFallback = '"JetBrainsMono Nerd Font Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
5760
5861const monoBase = monoFallback
5962const sansBase = sansFallback
63+ const terminalBase = terminalFallback
6064
6165function input ( font : string | undefined ) {
6266 return font ?? ""
@@ -89,6 +93,14 @@ export function sansFontFamily(font: string | undefined) {
8993 return stack ( font , sansBase )
9094}
9195
96+ export function terminalInput ( font : string | undefined ) {
97+ return input ( font )
98+ }
99+
100+ export function terminalFontFamily ( font : string | undefined ) {
101+ return stack ( font , terminalBase )
102+ }
103+
92104const defaultSettings : Settings = {
93105 general : {
94106 autoSave : true ,
@@ -110,6 +122,7 @@ const defaultSettings: Settings = {
110122 fontSize : 14 ,
111123 mono : "" ,
112124 sans : "" ,
125+ terminal : "" ,
113126 } ,
114127 keybinds : { } ,
115128 permissions : {
@@ -233,6 +246,10 @@ export const { use: useSettings, provider: SettingsProvider } = createSimpleCont
233246 setUIFont ( value : string ) {
234247 setStore ( "appearance" , "sans" , value . trim ( ) ? value : "" )
235248 } ,
249+ terminalFont : withFallback ( ( ) => store . appearance ?. terminal , defaultSettings . appearance . terminal ) ,
250+ setTerminalFont ( value : string ) {
251+ setStore ( "appearance" , "terminal" , value . trim ( ) ? value : "" )
252+ } ,
236253 } ,
237254 keybinds : {
238255 get : ( action : string ) => store . keybinds ?. [ action ] ,
0 commit comments