-
Notifications
You must be signed in to change notification settings - Fork 2
files core monitor touchbarconstants swift 7cc9d767
ventaphobia edited this page Apr 23, 2026
·
1 revision
- Area: Touch Bar and Pock widget runtime.
- This page records the file's current repository role, source metadata, and recent commit history.
- Review nearby tests and commit pages before changing this file.
| Field | Value |
|---|---|
| Source path | Core-Monitor/TouchBarConstants.swift |
| Wiki area | Touch Bar and Pock widget runtime |
| Exists in current checkout | True |
| Size | 5600 bytes |
| Binary | False |
| Line count | 106 |
| Extension | .swift |
AppKit, Foundation
| Kind | Name | Line |
|---|---|---|
| enum | TB |
7 |
| Commit | Date | Subject |
|---|---|---|
4db7203 |
2026-04-16 | Reduce redundant Touch Bar and menu refresh work |
2664fd1 |
2026-04-11 | Update Core Monitor |
011232b |
2026-04-11 | Update website install video |
- Prefer focused changes that respect the ownership described above.
- If this file touches helper trust, SMC writes, startup, or permissions, update the relevant support docs and tests.
- If this file is generated or an asset manifest, verify the producing workflow instead of hand-editing generated payloads.
// TouchBarConstants.swift
// CoreMonitor — single source of truth for every visual token.
// All values tuned from reference screenshots.
import AppKit
import Foundation
enum TB {
static let refreshInterval: TimeInterval = 10
// ── Physical Touch Bar geometry ───────────────────────────────────────
/// Physical height of the Touch Bar strip in points.
static let stripH: CGFloat = 30
// ── Group pill ────────────────────────────────────────────────────────
/// Vertical inset so the pill is shorter than the strip.
static let pillVInset: CGFloat = 2
static let pillH: CGFloat = stripH - pillVInset * 2 // = 24
static let pillRadius: CGFloat = 7.5
// ── Inter-group gap ───────────────────────────────────────────────────
static let groupGap: CGFloat = 8
// ── Horizontal padding inside a pill ─────────────────────────────────
static let hPad: CGFloat = 12
static let innerGap: CGFloat = 8
// ── Typography — SF Pro across the board ─────────────────────────────
/// Tiny uppercase label above a bar or beside a value (MEM / SSD / CPU / FPS / BAT)
static let fontKey = NSFont.systemFont(ofSize: 8, weight: .semibold)
/// Value text (13%, 45°, 12, Way Out)
static let fontVal = NSFont.systemFont(ofSize: 11, weight: .semibold)
/// Large time / date (10:38 / Mon 3:03 / Apr 30th)
static let fontBig = NSFont.monospacedDigitSystemFont(ofSize: 16, weight: .bold)
/// Network speed lines (↑ 13 KB/s)
static let fontNet = NSFont.monospacedDigitSystemFont(ofSize: 10, weight: .semibold)
/// Flag + time zone lines
static let fontTZ = NSFont.systemFont(ofSize: 11, weight: .semibold)
/// Weather condition tiny label
static let fontCond = NSFont.systemFont(ofSize: 9, weight: .regular)
- Home
- Start Here
- Product Overview
- Runtime Architecture
- Monitoring Pipeline
- Fan Control
- Privileged Helper
- Touch Bar
- Release Automation
- Security Model
- File Index (279)
- Every Commit (401)
- Chronological Change Log
- Removed Parts
- All Deleted Paths
- Branches And Tags
- Wiki Manifest
- Start Here
- Product Overview
- Source Map
- Runtime Architecture
- App Startup And Lifecycle
- Dashboard Architecture
- Menu Bar Architecture
- Monitoring Pipeline
- Snapshot Trends And Freshness
- CPU GPU Memory Disk Network
- Battery Power And Thermals
- SMC And Apple Silicon
- Fan Control
- Custom Fan Curves
- Privileged Helper
- XPC Trust Boundary
- Helper Diagnostics
- Touch Bar Architecture
- Touch Bar Customization
- Weather And Location
- Privacy And Permissions
- Onboarding And Help
- Legacy Alerts
- Kernel Panic Weird Mode