返回资讯中心
外部精选
软件工程
#开发者实时流

Monochrome – Mobile Browser for macOS

Monochrome is a lightweight, native mobile web browser for macOS built with AppKit and WebKit (WKWebView). It renders websites using an iPhone Safari user agent inside compact, mobile-sized macOS windows—ideal for distr…

Hacker News 最新lucianmarin2026/10/23 · 14 天前8 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Monochrome is a lightweight, native mobile web browser for macOS built with AppKit and WebKit (WKWebView). It renders websites using an iPhone Safari user agent inside compact, mobile-sized macOS windows—ideal for distraction-free browsing, side-by-side reference windows, and testing responsive mobile layouts.

Mobile Viewport & User Agent: Sends an iOS Safari (iPhone) user agent so websites serve their fast, clean mobile layouts on macOS.

iPhone Viewport Presets: Quickly switch between 6 standard iPhone logical viewport dimensions (⌘1–⌘6), defaulting to SE (375 × 667) with resizable bounds from 320 × 480 up to 440 × 956.

Compact Expanded Toolbar: Native macOS toolbar displaying Back, Reload / Stop, Home, and the Address field by default, with optional customizable items (Forward, New, Loading indicator, spaces).

LZFSE-Compressed Browsing History: Stores up to 1,000 normalized, deduplicated URLs in most-recently-used (MRU) order inside UserDefaults using Apple's LZFSE compression—requiring zero external database files.

Inline Address Bar Autocomplete: Suggests and highlights matching URL suffixes from browsing history as you type, handling optional http(s):// and www. prefixes and prioritizing clean paths before query strings.

Smart Address & Search Bar: Navigates directly to URLs or domains and routes search queries through a configurable search engine (defaulting to DuckDuckGo HTML: https://html.duckduckgo.com/html/?q=).

Multi-Window & Tabbed Browsing: Built on NSDocument to support multiple independent browser windows and native macOS window tabs (⌘N, ⌘T).

Trackpad Gestures & Zoom: Supports two-finger swipe back/forward navigation gestures and pinch-to-zoom magnification.

Window Size Presets

Accessible from the View menu or via keyboard shortcuts:

Action Shortcut

New Window / Tab ⌘N / ⌘T

Open Location (Focus Address Bar) ⌘L

Reload Page ⌘R

Reload From Origin ⇧⌘R

Stop Loading ⌘.

Back ⌘[

Forward ⌘]

Home ⇧⌘H

Find on Page ⌘F

Preferences ⌘,

Customize Toolbar ⌥⌘T

Resize Window (5s – Max) ⌘1 – ⌘6

Preferences & Defaults

Open Monochrome → Preferences… (⌘,) to customize:

Settings and LZFSE-compressed browsing history (BrowsingHistory) are stored in UserDefaults under com.lucianmarin.Monochrome.

Monochrome/AppDelegate.swift — Application lifecycle and default Homepage / SearchEngine registration.

Monochrome/Document.swift — Browser window controller (NSDocument), programmatic NSToolbarDelegate, WKNavigationDelegate / WKUIDelegate, window size presets, BrowsingHistory LZFSE store, and NSTextFieldDelegate inline autocomplete.

Monochrome/Preferences.swift & Monochrome/Preferences.xib — Preferences window controller bound to NSUserDefaultsController.

Monochrome/Base.lproj/Document.xib — Browser window nib and WKWebView configuration.

Monochrome/Base.lproj/MainMenu.xib — Application menu bar and keyboard shortcuts.

Building & Running

Open Monochrome.xcodeproj in Xcode (Swift 5, macOS SDK).

Select the Monochrome scheme and press Run (⌘R), or build from the command line:

xcodebuild -project Monochrome.xcodeproj -scheme Monochrome -configuration Release build

License

Copyright © Lucian Marin. All rights reserved.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →