Skip to content
简体中文

egfx-browser

egfx-browser mounts your operating system’s native multi-process browser engine directly inside Emacs windows using egfx’s GPU-less native container host (native-container / EGFX_GPU_NONE):

  • macOS: WKWebView (WebKit.framework)
  • Linux: WebKitGTK (libwebkit2gtk-4.1.so.0 loaded via dlopen, zero -dev headers; works on PGTK Wayland, PGTK X11, and X11-GTK3)
  • Windows: Microsoft Edge WebView2 (pure C COM with runtime loader / Registry discovery)

No CEF bundling, no Emacs binary patching, zero GPU swapchain allocation, and zero offscreen pixel copying.

  • One buffer per tab & 4 configurable tab UI styles: Use standard C-x b, split windows, and q, plus lazy background tabs (T, middle-click, Cmd/Ctrl+Click), closed-tab undo (u), duplicate (c), pin (x), tab suspension (z or idle auto-suspend), and lazy-mounted named sessions. Pick your preferred layout via M-x egfx-browser-tab-style-set: sidebar (collapsible left *Browser Tabs*), popover (centered fuzzy-search floating child frame via v / M p with instant 1..9 jumping), compact (inline tabs merged inside the single-row header-line), or none (minimal single-row address bar only).
  • Unified Omnibar & Built-in SQLite: o / t open a completing-read Omnibar ranking open tabs, bookmarks, frecency history, and search prefixes (g, ddg, gh, w, mdn, b), backed by Emacs 29.1+ built-in SQLite (browser.sqlite, WAL mode).
  • Desktop Browser Cookie & Bookmark Import: Sign into existing sites in seconds without re-authenticating. Import encrypted Chromium cookies (Chrome, Arc, Edge, Brave, Vivaldi, Opera) directly via pure-Elisp GnuTLS AES-128-CBC / PBKDF2-HMAC-SHA1 (A i, A s) or Firefox cookies.sqlite, Netscape cookies.txt, and Playwright storageState.json (A I), plus direct desktop browser bookmark import (A B / A F).
  • Native-first Dark Mode (MIT Dark Reader) & Custom Web Fonts: Adaptive dark mode (d, G D, G R) preserves official native site dark themes untouched via 9-point luminance sampling and runs the bundled MIT Dark Reader dynamic CSS engine on light-only pages with zero flash and live brightness/contrast/sepia controls (G B / G C / G S). Built-in CJK/Latin custom web font injection (a, C-u a, G f, G r) overrides page typography (supporting live emacs-frame font matching) while protecting icon fonts, emoji, math (KaTeX/MathJax), and monospace syntax-highlighted code blocks.
  • Emacs-first focus & ? transient menu: Emacs retains keyboard focus until you click an editable input or enter passthrough (C-z, ESC returns). Press ? (or click ≡ in the header-line) to open a floating child-frame transient command menu without shrinking the web view.
  • Privacy, Multi-Profile & Native Content Blocking: Ephemeral incognito tabs (? E), isolated named profiles (? A), native ad/tracker filtering (WKContentRuleListStore / WebKitUserContentFilterStore / WebResourceRequested) with EasyList/hosts import, per-origin zoom/permissions, User-Agent presets, and per-view HTTP/SOCKS5 proxy.
  • Link Hints, UserScripts & Reader Mode: Prefix-free keyboard Link Hints (f / F / y f), document-start/document-end UserScripts & UserStyles, and one-key Reader Mode (R / C-u R).
  • Deep Emacs Integration: Rule-based browse-url routing, bookmark.el (C-x r m / C-x r b), org-mode link capture & Org/Markdown clipping (y o / y m), Edit with Emacs (e) for any web <textarea> or rich editor, PDF export, full-page screenshots, native DevTools (<f12>), and *Browser Console* JS REPL.
Terminal window
make -C /path/to/emacs-gfx/packages/egfx native-build
make -C /path/to/emacs-gfx/apps/egfx-browser native
(add-to-list 'load-path "/path/to/emacs-gfx/packages/egfx")
(add-to-list 'load-path "/path/to/emacs-gfx/apps/egfx-browser")
(require 'egfx-browser)
(egfx-browser-open "https://emacs-gfx.github.io")

Run M-x egfx-browser-doctor to inspect engine readiness, SQLite storage, active profile, and capabilities.