-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Widen font-size bounds + add Terminal Font Size setting #5338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115203,6 +115203,23 @@ | |
| } | ||
| } | ||
| }, | ||
| "settings.search.alias.setting.terminal.font-size": { | ||
| "extractionState": "manual", | ||
| "localizations": { | ||
| "en": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "font-size terminal font size text scale shell zoom bigger smaller larger point base" | ||
| } | ||
| }, | ||
| "ja": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "font-size terminal font size ターミナル フォントサイズ テキスト 拡大 縮小 ズーム 大きく 小さく ポイント" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "settings.search.alias.setting.terminal.tab-bar-font-size": { | ||
| "extractionState": "manual", | ||
| "localizations": { | ||
|
Comment on lines
115203
to
115225
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The catalog contains 21 locales (ar, bs, da, de, en, es, fr, it, ja, km, ko, nb, ok, pl, pt, pt-BR, px, ru, th, tr, uk), but all five new keys ( Rule Used: Flag production user-facing text that is not fully... (source) |
||
|
|
@@ -145899,6 +145916,74 @@ | |
| } | ||
| } | ||
| }, | ||
| "settings.terminal.fontSize": { | ||
| "extractionState": "manual", | ||
| "localizations": { | ||
| "en": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Terminal Font Size" | ||
| } | ||
| }, | ||
| "ja": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "ターミナルのフォントサイズ" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "settings.terminal.fontSize.reset": { | ||
| "extractionState": "manual", | ||
| "localizations": { | ||
| "en": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Reset" | ||
| } | ||
| }, | ||
| "ja": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "リセット" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "settings.terminal.fontSize.saveFailed": { | ||
| "extractionState": "manual", | ||
| "localizations": { | ||
| "en": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Couldn't save terminal font size. Please try again." | ||
| } | ||
| }, | ||
| "ja": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "ターミナルのフォントサイズを保存できませんでした。もう一度お試しください。" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "settings.terminal.fontSize.subtitle": { | ||
| "extractionState": "manual", | ||
| "localizations": { | ||
| "en": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "Sets the base font size of terminal text. The Cmd +/- zoom shortcut adjusts the live size on top of this." | ||
| } | ||
| }, | ||
| "ja": { | ||
| "stringUnit": { | ||
| "state": "translated", | ||
| "value": "ターミナルテキストの基本フォントサイズを設定します。Cmd +/- のズームショートカットは、これに加えて表示サイズを調整します。" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "settings.terminal.tabBarFontSize": { | ||
| "extractionState": "manual", | ||
| "localizations": { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -19,9 +19,12 @@ struct GhosttyConfig { | |||||
| static let defaultSurfaceTabBarFontSize = CGFloat(CmuxGhosttyConfigSettingEditor.defaultSurfaceTabBarFontSize) | ||||||
| static let minSurfaceTabBarFontSize = CGFloat(CmuxGhosttyConfigSettingEditor.minSurfaceTabBarFontSize) | ||||||
| static let maxSurfaceTabBarFontSize = CGFloat(CmuxGhosttyConfigSettingEditor.maxSurfaceTabBarFontSize) | ||||||
| static let defaultTerminalFontSize = CGFloat(CmuxGhosttyConfigSettingEditor.defaultTerminalFontSize) | ||||||
| static let minTerminalFontSize = CGFloat(CmuxGhosttyConfigSettingEditor.minTerminalFontSize) | ||||||
| static let maxTerminalFontSize = CGFloat(CmuxGhosttyConfigSettingEditor.maxTerminalFontSize) | ||||||
|
|
||||||
| var fontFamily: String = "Menlo" | ||||||
| var fontSize: CGFloat = 12 | ||||||
| var fontSize: CGFloat = Self.defaultTerminalFontSize | ||||||
| var surfaceTabBarFontSize: CGFloat = Self.defaultSurfaceTabBarFontSize | ||||||
| var sidebarFontSize: CGFloat = Self.defaultSidebarFontSize | ||||||
| var theme: String? | ||||||
|
|
@@ -401,8 +404,8 @@ struct GhosttyConfig { | |||||
| case "font-family": | ||||||
| fontFamily = value | ||||||
| case "font-size": | ||||||
| if let size = Double(value) { | ||||||
| fontSize = CGFloat(size) | ||||||
| if let size = Double(value), size.isFinite { | ||||||
| fontSize = Self.clampedTerminalFontSize(CGFloat(size)) | ||||||
|
Comment on lines
+407
to
+408
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When users already have a Ghostty Useful? React with 👍 / 👎. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clamped parse desyncs terminal UILow Severity Parsing Additional Locations (1)Reviewed by Cursor Bugbot for commit 40b5716. Configure here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Parse-time clamping of Prompt for AI agents
Suggested change
|
||||||
| } | ||||||
| case "surface-tab-bar-font-size": | ||||||
| if let size = Double(value), size.isFinite { | ||||||
|
|
@@ -681,6 +684,10 @@ struct GhosttyConfig { | |||||
| CGFloat(CmuxGhosttyConfigSettingEditor.clampedSurfaceTabBarFontSize(Double(value))) | ||||||
| } | ||||||
|
|
||||||
| static func clampedTerminalFontSize(_ value: CGFloat) -> CGFloat { | ||||||
| CGFloat(CmuxGhosttyConfigSettingEditor.clampedTerminalFontSize(Double(value))) | ||||||
| } | ||||||
|
|
||||||
| private static func parseBackgroundBlur(_ value: String) -> GhosttyBackgroundBlur? { | ||||||
| switch value { | ||||||
| case "false", "0": | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -345,6 +345,7 @@ enum SettingsSearchIndex { | |
| setting(.app, "palette-search-all", String(localized: "settings.app.commandPaletteSearchAllSurfaces", defaultValue: "Command Palette Searches All Surfaces"), "cmd p search terminal browser markdown"), | ||
| setting(.terminal, "scrollbar", String(localized: "settings.terminal.scrollBar", defaultValue: "Show Terminal Scroll Bar"), "terminal shell scrollback"), | ||
| setting(.terminal, "copy-on-select", String(localized: "settings.terminal.copyOnSelect", defaultValue: "Copy on Selection"), "terminal.copyOnSelect clipboard selection mouse double click triple click"), | ||
| setting(.terminal, "font-size", String(localized: "settings.terminal.fontSize", defaultValue: "Terminal Font Size"), "font size text scale terminal shell zoom bigger smaller font-size point"), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add missing Line 348 registers the searchable setting, but 🔧 Proposed fix private static let settingsPathAnchorIDs: [String: String] = [
+ "font-size": settingID(for: .terminal, idSuffix: "font-size"),
"rightSidebar.beta.feed.enabled": settingID(for: .betaFeatures, idSuffix: "feed"),
"rightSidebar.beta.dock.enabled": settingID(for: .betaFeatures, idSuffix: "dock"),🤖 Prompt for AI AgentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Missing Prompt for AI agents |
||
| setting(.terminal, "tab-bar-font-size", String(localized: "settings.terminal.tabBarFontSize", defaultValue: "Tab Bar Font Size"), "font size text scale terminal browser pane tab title surface-tab-bar-font-size"), | ||
| setting(.terminal, "agent-auto-resume", String(localized: "settings.terminal.agentAutoResume", defaultValue: "Resume Agent Sessions on Reopen"), "terminal.autoResumeAgentSessions auto resume restore reopen relaunch quit sessions agents claude code codex opencode rovo dev rovodev toggle"), | ||
| setting(.terminal, "agent-hibernation", String(localized: "settings.terminal.agentHibernation", defaultValue: "Agent Hibernation"), "terminal.agentHibernation idle hibernate suspend background agents claude code codex opencode live terminals"), | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shipped Settings window builds its sidebar search from
CmuxSettingsUI.SettingsSearchIndex/CuratedSettingEntry+Default, not the legacySources/SettingsNavigationtable updated in this commit; because this new.settingsOnlyrow also has no explicitsearchAnchorID, searching for terminal font size cannot surface or scroll/highlight this row in the active settings UI. Add the entry to the package search index and give this settings-only row the matching anchor so the new setting is discoverable.Useful? React with 👍 / 👎.