native macOS codings agent orchestrator
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove custom Ghostty font usage from UI, use system font instead

Removes GhosttyFontManager and GhosttyMonospacedModifier, replacing all
ghosttyMonospaced() calls with standard system fonts. Terminal pane
continues to use Ghostty's font settings via runtime config.

khoi f1e946cb 584683fa

+38 -269
+1 -1
supacode/App/AppLoadingView.swift
··· 30 30 var body: some View { 31 31 VStack { 32 32 Text(Self.messages[messageIndex]) 33 - .ghosttyMonospaced(.title3) 33 + .font(.title3) 34 34 .bold() 35 35 ProgressView() 36 36 .controlSize(.large)
-6
supacode/App/supacodeApp.swift
··· 31 31 struct SupacodeApp: App { 32 32 @State private var ghostty: GhosttyRuntime 33 33 @State private var ghosttyShortcuts: GhosttyShortcutManager 34 - @State private var ghosttyFonts: GhosttyFontManager 35 34 @State private var terminalManager: WorktreeTerminalManager 36 35 @State private var worktreeInfoWatcher: WorktreeInfoWatcherManager 37 36 @State private var commandKeyObserver: CommandKeyObserver ··· 65 64 _ghostty = State(initialValue: runtime) 66 65 let shortcuts = GhosttyShortcutManager(runtime: runtime) 67 66 _ghosttyShortcuts = State(initialValue: shortcuts) 68 - let fonts = GhosttyFontManager(runtime: runtime) 69 - _ghosttyFonts = State(initialValue: fonts) 70 67 let initialSettings = GlobalSettings.default 71 68 let terminalManager = WorktreeTerminalManager(runtime: runtime) 72 69 _terminalManager = State(initialValue: terminalManager) ··· 101 98 SettingsWindowManager.shared.configure( 102 99 store: appStore, 103 100 ghosttyShortcuts: shortcuts, 104 - ghosttyFonts: fonts, 105 101 commandKeyObserver: keyObserver 106 102 ) 107 103 } ··· 111 107 GhosttyColorSchemeSyncView(ghostty: ghostty) { 112 108 ContentView(store: store, terminalManager: terminalManager) 113 109 .environment(ghosttyShortcuts) 114 - .environment(ghosttyFonts) 115 110 .environment(commandKeyObserver) 116 111 } 117 112 .preferredColorScheme(store.settings.appearanceMode.colorScheme) 118 113 } 119 114 .environment(ghosttyShortcuts) 120 - .environment(ghosttyFonts) 121 115 .environment(commandKeyObserver) 122 116 .commands { 123 117 WorktreeCommands(store: store)
-3
supacode/Features/Repositories/Views/FailedRepositoryRow.swift
··· 14 14 .fill(.secondary.opacity(0.2)) 15 15 Text(initials) 16 16 .font(.caption) 17 - .ghosttyMonospaced(.caption) 18 17 .foregroundStyle(.secondary) 19 18 } 20 19 .frame(width: 24, height: 24) ··· 22 21 VStack(alignment: .leading, spacing: 2) { 23 22 Text(name) 24 23 .font(.headline) 25 - .ghosttyMonospaced(.headline) 26 24 Text(path) 27 25 .font(.caption) 28 - .ghosttyMonospaced(.caption) 29 26 .foregroundStyle(.secondary) 30 27 } 31 28 Spacer(minLength: 8)
+3 -3
supacode/Features/Repositories/Views/OpenWorktreeActionMenuLabelView.swift
··· 28 28 if let shortcutHint { 29 29 HStack(spacing: 2) { 30 30 Text(action.labelTitle) 31 - .ghosttyMonospaced(.body) 31 + .font(.body) 32 32 Text("(\(shortcutHint))") 33 - .ghosttyMonospaced(.body) 33 + .font(.body) 34 34 .foregroundStyle(.secondary) 35 35 } 36 36 } else { 37 37 Text(action.labelTitle) 38 - .ghosttyMonospaced(.body) 38 + .font(.body) 39 39 } 40 40 } 41 41 }
+1 -1
supacode/Features/Repositories/Views/PullRequestBadgeView.swift
··· 37 37 38 38 var body: some View { 39 39 Text(text) 40 - .ghosttyMonospaced(.caption2) 40 + .font(.caption2) 41 41 .foregroundStyle(color) 42 42 .padding(.horizontal, 6) 43 43 .padding(.vertical, 2)
+1 -1
supacode/Features/Repositories/Views/PullRequestStatusButton.swift
··· 30 30 } 31 31 } 32 32 } 33 - .ghosttyMonospaced(.caption) 33 + .font(.caption) 34 34 } 35 35 36 36 }
+4 -4
supacode/Features/Repositories/Views/RepoHeaderRow.swift
··· 9 9 var body: some View { 10 10 HStack { 11 11 Image(systemName: "chevron.right") 12 - .ghosttyMonospaced(.caption) 12 + .font(.caption) 13 13 .foregroundStyle(.secondary) 14 14 .accessibilityHidden(true) 15 15 .rotationEffect(.degrees(isExpanded ? 90 : 0)) ··· 19 19 RoundedRectangle(cornerRadius: 6, style: .continuous) 20 20 .fill(.secondary.opacity(0.2)) 21 21 Text(initials) 22 - .ghosttyMonospaced(.caption) 22 + .font(.caption) 23 23 .foregroundStyle(.secondary) 24 24 } 25 25 .frame(width: 24, height: 24) 26 26 .clipShape(.rect(cornerRadius: 6, style: .continuous)) 27 27 Text(name) 28 - .ghosttyMonospaced(.headline) 28 + .font(.headline) 29 29 .foregroundStyle(.primary) 30 30 if isRemoving { 31 31 Text("Removing...") 32 - .ghosttyMonospaced(.caption) 32 + .font(.caption) 33 33 .foregroundStyle(.secondary) 34 34 } 35 35 }
+1 -1
supacode/Features/Repositories/Views/SidebarFooterView.swift
··· 13 13 } label: { 14 14 HStack(spacing: 6) { 15 15 Label("Add Repository", systemImage: "folder.badge.plus") 16 - .ghosttyMonospaced(.callout) 16 + .font(.callout) 17 17 if commandKeyObserver.isPressed { 18 18 ShortcutHintView(text: AppShortcuts.openRepository.display, color: .secondary) 19 19 }
+1 -1
supacode/Features/Repositories/Views/WorktreeDetailTitleView.swift
··· 18 18 .accessibilityHidden(true) 19 19 Text(branchName) 20 20 } 21 - .ghosttyMonospaced(.headline) 21 + .font(.headline) 22 22 } 23 23 .help("Rename branch") 24 24 .popover(isPresented: $isPresented) {
+2 -3
supacode/Features/Repositories/Views/WorktreeDetailView.swift
··· 240 240 } 241 241 } label: { 242 242 Image(systemName: "chevron.down") 243 - .ghosttyMonospaced(.caption2) 243 + .font(.caption2) 244 244 .accessibilityLabel("Open in menu") 245 245 } 246 246 .imageScale(.small) ··· 328 328 329 329 if commandKeyObserver.isPressed { 330 330 Text(config.shortcut) 331 - .ghosttyMonospaced(.caption) 331 + .font(.caption) 332 332 .foregroundStyle(.secondary) 333 333 } 334 334 } 335 335 } 336 336 .font(.caption) 337 - .ghosttyMonospaced(.caption) 338 337 .help(config.helpText) 339 338 .disabled(!config.isEnabled) 340 339 }
+4 -4
supacode/Features/Repositories/Views/WorktreeLoadingView.swift
··· 12 12 VStack { 13 13 ProgressView() 14 14 Text(info.name) 15 - .ghosttyMonospaced(.headline) 15 + .font(.headline) 16 16 if let repositoryName = info.repositoryName { 17 17 Text("\(actionLabel) worktree in \(repositoryName)") 18 - .ghosttyMonospaced(.subheadline) 18 + .font(.subheadline) 19 19 .foregroundStyle(.secondary) 20 20 } else { 21 21 Text("\(actionLabel) worktree...") 22 - .ghosttyMonospaced(.subheadline) 22 + .font(.subheadline) 23 23 .foregroundStyle(.secondary) 24 24 } 25 25 Text(followup) 26 - .ghosttyMonospaced(.subheadline) 26 + .font(.subheadline) 27 27 .foregroundStyle(.secondary) 28 28 } 29 29 .frame(maxWidth: .infinity, maxHeight: .infinity)
+6 -6
supacode/Features/Repositories/Views/WorktreeRow.swift
··· 38 38 ZStack { 39 39 if showsNotificationIndicator { 40 40 Image(systemName: "bell.fill") 41 - .ghosttyMonospaced(.caption) 41 + .font(.caption) 42 42 .foregroundStyle(.orange) 43 43 .opacity(showsSpinner ? 0 : 1) 44 44 .help("Unread notifications") 45 45 .accessibilityLabel("Unread notifications") 46 46 } else { 47 47 Image(systemName: branchIconName) 48 - .ghosttyMonospaced(.caption) 48 + .font(.caption) 49 49 .foregroundStyle(.secondary) 50 50 .opacity(showsSpinner ? 0 : 1) 51 51 .accessibilityHidden(true) ··· 59 59 if hasInfo { 60 60 VStack(alignment: .leading, spacing: 2) { 61 61 Text(name) 62 - .ghosttyMonospaced(.body) 62 + .font(.body) 63 63 WorktreeRowInfoView(addedLines: displayAddedLines, removedLines: displayRemovedLines) 64 64 } 65 65 } else { 66 66 Text(name) 67 - .ghosttyMonospaced(.body) 67 + .font(.body) 68 68 } 69 69 Spacer(minLength: 8) 70 70 if isRunScriptRunning { 71 71 Image(systemName: "play.fill") 72 - .ghosttyMonospaced(.caption) 72 + .font(.caption) 73 73 .foregroundStyle(.green) 74 74 .help("Run script active") 75 75 .accessibilityLabel("Run script active") ··· 114 114 } 115 115 } 116 116 } 117 - .ghosttyMonospaced(.caption) 117 + .font(.caption) 118 118 .frame(minHeight: 14) 119 119 } 120 120 }
+6 -6
supacode/Features/Repositories/Views/XcodeStyleToolbarViews.swift
··· 247 247 HStack(spacing: 8) { 248 248 Image(systemName: style.icon) 249 249 .foregroundStyle(style.color) 250 - .ghosttyMonospaced(.callout) 250 + .font(.callout) 251 251 .accessibilityHidden(true) 252 252 253 253 Text(Self.message(for: context.date)) 254 - .ghosttyMonospaced(.footnote) 254 + .font(.footnote) 255 255 .foregroundStyle(.secondary) 256 256 } 257 257 } ··· 264 264 HStack(spacing: 5) { 265 265 Image(systemName: "exclamationmark.triangle.fill") 266 266 .foregroundStyle(.yellow) 267 - .ghosttyMonospaced(.footnote) 267 + .font(.footnote) 268 268 .accessibilityHidden(true) 269 269 Text("3") 270 - .ghosttyMonospaced(.footnote, weight: .medium) 270 + .font(.system(.footnote, weight: .medium)) 271 271 } 272 272 .padding(.horizontal, 8) 273 273 .padding(.vertical, 4) ··· 276 276 HStack(spacing: 5) { 277 277 Image(systemName: "xmark.circle.fill") 278 278 .foregroundStyle(.red) 279 - .ghosttyMonospaced(.footnote) 279 + .font(.footnote) 280 280 .accessibilityHidden(true) 281 281 Text("0") 282 - .ghosttyMonospaced(.footnote, weight: .medium) 282 + .font(.system(.footnote, weight: .medium)) 283 283 } 284 284 .padding(.horizontal, 8) 285 285 .padding(.vertical, 4)
+1 -5
supacode/Features/Settings/BusinessLogic/SettingsWindowManager.swift
··· 9 9 private var settingsWindow: NSWindow? 10 10 private var store: StoreOf<AppFeature>? 11 11 private var ghosttyShortcuts: GhosttyShortcutManager? 12 - private var ghosttyFonts: GhosttyFontManager? 13 12 private var commandKeyObserver: CommandKeyObserver? 14 13 15 14 private init() {} ··· 17 16 func configure( 18 17 store: StoreOf<AppFeature>, 19 18 ghosttyShortcuts: GhosttyShortcutManager, 20 - ghosttyFonts: GhosttyFontManager, 21 19 commandKeyObserver: CommandKeyObserver 22 20 ) { 23 21 self.store = store 24 22 self.ghosttyShortcuts = ghosttyShortcuts 25 - self.ghosttyFonts = ghosttyFonts 26 23 self.commandKeyObserver = commandKeyObserver 27 24 } 28 25 ··· 35 32 return 36 33 } 37 34 38 - guard let store, let ghosttyShortcuts, let ghosttyFonts, let commandKeyObserver else { 35 + guard let store, let ghosttyShortcuts, let commandKeyObserver else { 39 36 return 40 37 } 41 38 let settingsView = SettingsView(store: store) 42 39 .environment(ghosttyShortcuts) 43 - .environment(ghosttyFonts) 44 40 .environment(commandKeyObserver) 45 41 let hostingController = NSHostingController(rootView: settingsView) 46 42
-1
supacode/Features/Settings/Views/AppearanceOptionCardView.swift
··· 40 40 .aspectRatio(1.6, contentMode: .fit) 41 41 Text(mode.title) 42 42 .font(.headline) 43 - .ghosttyMonospaced(.headline) 44 43 } 45 44 .frame(maxWidth: .infinity) 46 45 .padding()
+2 -2
supacode/Features/Settings/Views/GithubSettingsView.swift
··· 84 84 case .authenticated(let username, let host): 85 85 LabeledContent("Signed in as") { 86 86 Text(username) 87 - .ghosttyMonospaced(.body) 87 + .font(.body) 88 88 } 89 89 LabeledContent("Host") { 90 90 Text(host) 91 - .ghosttyMonospaced(.body) 91 + .font(.body) 92 92 } 93 93 94 94 case .error(let message):
-4
supacode/Features/Settings/Views/RepositorySettingsView.swift
··· 62 62 text: settings.setupScript 63 63 ) 64 64 .font(.body) 65 - .ghosttyMonospaced(.body) 66 65 .frame(minHeight: 120) 67 66 if store.settings.setupScript.isEmpty { 68 67 Text("claude --dangerously-skip-permissions") 69 68 .foregroundStyle(.secondary) 70 69 .padding(.leading, 6) 71 70 .font(.body) 72 - .ghosttyMonospaced(.body) 73 71 .allowsHitTesting(false) 74 72 } 75 73 } ··· 86 84 text: settings.runScript 87 85 ) 88 86 .font(.body) 89 - .ghosttyMonospaced(.body) 90 87 .frame(minHeight: 120) 91 88 if store.settings.runScript.isEmpty { 92 89 Text("npm run dev") 93 90 .foregroundStyle(.secondary) 94 91 .padding(.leading, 6) 95 92 .font(.body) 96 - .ghosttyMonospaced(.body) 97 93 .allowsHitTesting(false) 98 94 } 99 95 }
+1 -1
supacode/Features/Terminal/TabBar/Views/TerminalTabCloseButton.swift
··· 20 20 } 21 21 .labelStyle(.iconOnly) 22 22 .buttonStyle(TerminalPressTrackingButtonStyle(isPressed: $isPressing)) 23 - .ghosttyMonospaced(.caption2) 23 + .font(.caption2) 24 24 .bold() 25 25 .foregroundStyle( 26 26 isHoveringClose ? TerminalTabBarColors.activeText : TerminalTabBarColors.inactiveText
+1 -1
supacode/Features/Terminal/TabBar/Views/TerminalTabLabelView.swift
··· 17 17 .accessibilityHidden(true) 18 18 } 19 19 Text(tab.title) 20 - .ghosttyMonospaced(.caption) 20 + .font(.caption) 21 21 .lineLimit(1) 22 22 .foregroundStyle(isActive ? TerminalTabBarColors.activeText : TerminalTabBarColors.inactiveText) 23 23 Spacer(minLength: TerminalTabBarMetrics.contentTrailingSpacing)
-2
supacode/Features/Terminal/Views/EmptyTerminalPaneView.swift
··· 7 7 VStack { 8 8 Text(message) 9 9 .font(.headline) 10 - .ghosttyMonospaced(.headline) 11 10 Text("Use the plus button to open a terminal.") 12 11 .font(.subheadline) 13 - .ghosttyMonospaced(.subheadline) 14 12 .foregroundStyle(.secondary) 15 13 } 16 14 .frame(maxWidth: .infinity, maxHeight: .infinity)
+1 -4
supacode/Features/Terminal/Views/GhosttySurfaceSearchOverlay.swift
··· 130 130 let totalLabel = state.searchTotal.map(String.init) ?? "?" 131 131 Text("\(selected + 1)/\(totalLabel)") 132 132 .font(.caption) 133 - .ghosttyMonospaced(.caption) 134 133 .foregroundStyle(.secondary) 135 134 .padding(.trailing, 8) 136 135 } else if let total = state.searchTotal { 137 136 Text("-/\(total)") 138 137 .font(.caption) 139 - .ghosttyMonospaced(.caption) 140 138 .foregroundStyle(.secondary) 141 139 .padding(.trailing, 8) 142 140 } ··· 265 263 var isFocused: Bool 266 264 var onSubmit: (Bool) -> Void 267 265 var onEscape: () -> Void 268 - @Environment(GhosttyFontManager.self) private var ghosttyFonts 269 266 270 267 func makeCoordinator() -> Coordinator { 271 268 Coordinator(text: $text) ··· 282 279 field.placeholderString = "Search" 283 280 field.usesSingleLineMode = true 284 281 field.lineBreakMode = .byTruncatingTail 282 + field.font = .systemFont(ofSize: NSFont.systemFontSize, weight: .regular) 285 283 return field 286 284 } 287 285 ··· 291 289 } 292 290 nsView.onSubmit = onSubmit 293 291 nsView.onEscape = onEscape 294 - nsView.font = ghosttyFonts.nsFont(size: NSFont.systemFontSize, weight: .regular) 295 292 296 293 if isFocused, nsView.window?.firstResponder !== nsView.currentEditor() { 297 294 nsView.window?.makeFirstResponder(nsView)
+1 -1
supacode/Features/Terminal/Views/TerminalSplitTreeView.swift
··· 133 133 .overlay { 134 134 if isHovering { 135 135 Image(systemName: "ellipsis") 136 - .ghosttyMonospaced(.callout, weight: .semibold) 136 + .font(.system(.callout, weight: .semibold)) 137 137 .foregroundStyle(.primary.opacity(0.5)) 138 138 .accessibilityHidden(true) 139 139 }
-1
supacode/Features/Terminal/Views/WorktreeNotificationsListView.swift
··· 9 9 VStack(alignment: .leading) { 10 10 Text("Notifications") 11 11 .font(.headline) 12 - .ghosttyMonospaced(.headline) 13 12 ForEach(state.notifications) { notification in 14 13 Button { 15 14 _ = state.focusSurface(id: notification.surfaceId)
-160
supacode/Infrastructure/Ghostty/GhosttyFontManager.swift
··· 1 - import AppKit 2 - import Observation 3 - import SwiftUI 4 - 5 - @MainActor 6 - @Observable 7 - final class GhosttyFontManager { 8 - private let runtime: GhosttyRuntime 9 - private var observer: NSObjectProtocol? 10 - private var familyName: String? 11 - 12 - init(runtime: GhosttyRuntime) { 13 - self.runtime = runtime 14 - refresh() 15 - observer = NotificationCenter.default.addObserver( 16 - forName: .ghosttyRuntimeConfigDidChange, 17 - object: nil, 18 - queue: .main 19 - ) { [weak self] _ in 20 - Task { @MainActor in 21 - self?.refresh() 22 - } 23 - } 24 - } 25 - 26 - @MainActor deinit { 27 - if let observer { 28 - NotificationCenter.default.removeObserver(observer) 29 - } 30 - } 31 - 32 - func font(for style: Font.TextStyle, weight: Font.Weight? = nil) -> Font { 33 - if let familyName { 34 - let base = Font.custom(familyName, size: preferredSize(for: style), relativeTo: style) 35 - return base.weight(weight ?? preferredWeight(for: style)) 36 - } 37 - if let weight { 38 - return .system(style, design: .monospaced).weight(weight) 39 - } 40 - return .system(style, design: .monospaced) 41 - } 42 - 43 - func font(size: CGFloat, weight: Font.Weight? = nil) -> Font { 44 - if familyName != nil { 45 - let nsWeight = weight.map(nsWeight(for:)) ?? .regular 46 - return Font(nsFont(size: size, weight: nsWeight)) 47 - } 48 - let resolvedWeight = weight ?? .regular 49 - return .system(size: size, weight: resolvedWeight, design: .monospaced) 50 - } 51 - 52 - func nsFont(size: CGFloat, weight: NSFont.Weight) -> NSFont { 53 - guard let familyName else { 54 - return NSFont.monospacedSystemFont(ofSize: size, weight: weight) 55 - } 56 - let descriptor = NSFontDescriptor(fontAttributes: [ 57 - .family: familyName, 58 - .traits: [NSFontDescriptor.TraitKey.weight: weight.rawValue], 59 - ]) 60 - if let font = NSFont(descriptor: descriptor, size: size) { 61 - return font 62 - } 63 - if let font = NSFont(name: familyName, size: size) { 64 - return font 65 - } 66 - return NSFont.monospacedSystemFont(ofSize: size, weight: weight) 67 - } 68 - 69 - private func refresh() { 70 - familyName = runtime.primaryFontFamilyName() 71 - } 72 - 73 - private func preferredSize(for style: Font.TextStyle) -> CGFloat { 74 - NSFont.preferredFont(forTextStyle: nsTextStyle(for: style)).pointSize 75 - } 76 - 77 - private func preferredWeight(for style: Font.TextStyle) -> Font.Weight { 78 - let font = NSFont.preferredFont(forTextStyle: nsTextStyle(for: style)) 79 - let traits = font.fontDescriptor.object(forKey: .traits) as? [NSFontDescriptor.TraitKey: Any] 80 - let weight = traits?[.weight] as? CGFloat ?? NSFont.Weight.regular.rawValue 81 - return fontWeight(for: NSFont.Weight(weight)) 82 - } 83 - 84 - private func fontWeight(for weight: NSFont.Weight) -> Font.Weight { 85 - switch weight.rawValue { 86 - case ..<(-0.7): 87 - return .ultraLight 88 - case ..<(-0.5): 89 - return .thin 90 - case ..<(-0.3): 91 - return .light 92 - case ..<(0.15): 93 - return .regular 94 - case ..<(0.28): 95 - return .medium 96 - case ..<(0.36): 97 - return .semibold 98 - case ..<(0.5): 99 - return .bold 100 - case ..<(0.7): 101 - return .heavy 102 - default: 103 - return .black 104 - } 105 - } 106 - 107 - private func nsWeight(for weight: Font.Weight) -> NSFont.Weight { 108 - switch weight { 109 - case .ultraLight: 110 - return .ultraLight 111 - case .thin: 112 - return .thin 113 - case .light: 114 - return .light 115 - case .regular: 116 - return .regular 117 - case .medium: 118 - return .medium 119 - case .semibold: 120 - return .semibold 121 - case .bold: 122 - return .bold 123 - case .heavy: 124 - return .heavy 125 - case .black: 126 - return .black 127 - default: 128 - return .regular 129 - } 130 - } 131 - 132 - private func nsTextStyle(for style: Font.TextStyle) -> NSFont.TextStyle { 133 - switch style { 134 - case .largeTitle: 135 - return .largeTitle 136 - case .title: 137 - return .title1 138 - case .title2: 139 - return .title2 140 - case .title3: 141 - return .title3 142 - case .headline: 143 - return .headline 144 - case .subheadline: 145 - return .subheadline 146 - case .body: 147 - return .body 148 - case .callout: 149 - return .callout 150 - case .footnote: 151 - return .footnote 152 - case .caption: 153 - return .caption1 154 - case .caption2: 155 - return .caption2 156 - @unknown default: 157 - return .body 158 - } 159 - } 160 - }
-15
supacode/Infrastructure/Ghostty/GhosttyRuntime.swift
··· 331 331 return Self.keyboardShortcut(for: trigger) 332 332 } 333 333 334 - func primaryFontFamilyName() -> String? { 335 - guard let config else { return Self.defaultFontFamilyName } 336 - var valuePtr: UnsafePointer<CChar>? 337 - let key = "font-family" 338 - if ghostty_config_get(config, &valuePtr, key, UInt(key.lengthOfBytes(using: .utf8))), 339 - let ptr = valuePtr 340 - { 341 - let value = String(cString: ptr) 342 - return value.isEmpty ? Self.defaultFontFamilyName : value 343 - } 344 - return Self.defaultFontFamilyName 345 - } 346 - 347 334 func shouldShowScrollbar() -> Bool { 348 335 guard let config else { return true } 349 336 var valuePtr: UnsafePointer<CChar>? ··· 413 400 GHOSTTY_KEY_BACKSPACE: .delete, 414 401 GHOSTTY_KEY_SPACE: .space, 415 402 ] 416 - 417 - private static let defaultFontFamilyName = "JetBrains Mono" 418 403 } 419 404 420 405 extension Notification.Name {
-31
supacode/Support/GhosttyMonospacedModifier.swift
··· 1 - import SwiftUI 2 - 3 - private struct GhosttyMonospacedStyleModifier: ViewModifier { 4 - @Environment(GhosttyFontManager.self) private var ghosttyFonts 5 - let style: Font.TextStyle 6 - let weight: Font.Weight? 7 - 8 - func body(content: Content) -> some View { 9 - content.font(ghosttyFonts.font(for: style, weight: weight)) 10 - } 11 - } 12 - 13 - private struct GhosttyMonospacedSizeModifier: ViewModifier { 14 - @Environment(GhosttyFontManager.self) private var ghosttyFonts 15 - let size: CGFloat 16 - let weight: Font.Weight? 17 - 18 - func body(content: Content) -> some View { 19 - content.font(ghosttyFonts.font(size: size, weight: weight)) 20 - } 21 - } 22 - 23 - extension View { 24 - func ghosttyMonospaced(_ style: Font.TextStyle, weight: Font.Weight? = nil) -> some View { 25 - modifier(GhosttyMonospacedStyleModifier(style: style, weight: weight)) 26 - } 27 - 28 - func ghosttyMonospaced(size: CGFloat, weight: Font.Weight? = nil) -> some View { 29 - modifier(GhosttyMonospacedSizeModifier(size: size, weight: weight)) 30 - } 31 - }
+1 -1
supacode/Support/ShortcutHintView.swift
··· 6 6 7 7 var body: some View { 8 8 Text(text) 9 - .ghosttyMonospaced(.caption2) 9 + .font(.caption2) 10 10 .foregroundStyle(color) 11 11 } 12 12 }