This repo is a small recipe for building Emacs with a
Ghostty-like macOS glass frame. It layers a local Cocoa patch on top of
Homebrew emacs-plus@31 and the community frame-transparency patch, then
configures Emacs with the same shape as Ghostty:

background-opacity = 0.01 background-blur = macos-glass-regular
This is not a dark overlay or a hard-coded theme. The patch adds native NSGlassEffectView
support only.

For the longer write-up, see the blog post.

The recipe uses the emacs-plus@31 formula, not the emacs-plus-app cask.
The cask ships a prebuilt binary and ignores ~/.config/emacs-plus/build.yml,
so it cannot apply local patches.

The build applies two patches, in order:

  • frame-transparencyfrom- d12frosted/emacs-plus
  • patches/ns-glass-effect.patchfrom this repo

The local patch adds these frame parameters:

| Parameter | Purpose |
|---|---|
| ns-glass-material | Native material, currently regular,clear, ornil. |
| ns-glass-tint-opacity | Theme-owned tint opacity over the glass view. |
| ns-glass-saturation | Saturation multiplier for the glass tint. |
| ns-glass-inactive-opacity | Optional opacity when the frame is inactive. |
| ns-glass-corner-radius | Optional corner radius for the glass view. |
| ns-alpha-glyphs-alpha | Separate alpha for real glyph backgrounds. |

The last parameter is what makes alpha-background values near 0 usable.
Without it, hl-line, regions, and completion selections disappear with the
frame background.

Install from your tap:

brew tap larrasket/emacs-liquid-glass https://github.com/larrasket/emacs-liquid-glass.git brew emacs-liquid-glass install
Skip copying the rebuilt app bundle into /Applications:

brew emacs-liquid-glass install --no-copy-appDirect clone usage also works:

git clone https://github.com/larrasket/emacs-liquid-glass cd emacs-liquid-glass ./install.sh
Use ./install.sh --no-copy-app if you do not want it to update
/Applications/Emacs.app and /Applications/Emacs Client.app.

Copy the patch and build config:

mkdir -p ~/.config/emacs-plus cp patches/ns-glass-effect.patch ~/.config/emacs-plus/ns-glass-effect.patch cp config/build.yml ~/.config/emacs-plus/build.yml
Build Emacs from source:

brew tap d12frosted/emacs-plus HOMEBREW_NO_AUTO_UPDATE=1 brew reinstall emacs-plus@31 --build-from-source brew postinstall d12frosted/emacs-plus/emacs-plus@31
Copy the app bundles used by Spotlight and /opt/homebrew/bin/emacs:

rsync -a --delete /opt/homebrew/opt/emacs-plus@31/Emacs.app/ /Applications/Emacs.app/ rsync -a --delete "/opt/homebrew/opt/emacs-plus@31/Emacs Client.app/" "/Applications/Emacs Client.app/"
Load lisp/lr-macos-glass.el from your Emacs config. If this repo is installed
as a Homebrew tap, you can find its path with:

brew emacs-liquid-glass pathExample:

(add-to-list 'load-path "/path/to/emacs-liquid-glass/lisp") (require 'lr-macos-glass)
The regular preset currently uses:

(setq salih/glass-style 'macos-glass-regular salih/alpha-background 0.01 salih/ns-background-blur 0 salih/ns-alpha-glyphs-min-alpha 0.24 salih/ns-glass-material 'regular salih/ns-glass-tint-opacity 0.05 salih/ns-glass-saturation 1.9 salih/ns-glass-inactive-opacity 0.05 salih/ns-glass-corner-radius 2 salih/ns-transparent-titlebar t)
Interactive commands:

| Command | Effect |
|---|---|
| M-x salih/set-glass-style | Switch between macos-glass-regularandmacos-glass-clear. |
| M-x salih/set-glass | Set frame alpha and CGS blur. |
| M-x salih/set-glass-glyph-alpha | Set highlight/selection glyph background alpha. |
| M-x salih/toggle-glass | Toggle between the glass frame and an opaque frame. |

If you set salih/alpha-background to 0, keep
salih/ns-alpha-glyphs-min-alpha above 0 if you still want hl-line,
regions, and completion selections to be visible.

If you find issue, please first check that the installed binary contains the new frame parameters:

strings /Applications/Emacs.app/Contents/MacOS/Emacs \ | rg 'ns-alpha-glyphs-alpha|ns-glass-material|ns-glass-saturation'
If emacs reports an invalid ns-glass-* value, you are probably running an
older build than the app bundle you just compiled. Fully quit GUI Emacs, restart
the daemon if you use one, and make sure /Applications/Emacs.app was copied
from /opt/homebrew/opt/emacs-plus@31/Emacs.app.

This has been tested on macOS with Homebrew emacs-plus@31. It should not be
expected to work on GNU/Linux, Windows, terminal Emacs, or the prebuilt
emacs-plus-app cask.