Liquid Glass effect for GNU/Emacs

Lobsters Hottest Tools

Summary

A recipe and patch set for building GNU Emacs on macOS with a native Liquid Glass frame effect inspired by Ghostty, adding NSGlassEffectView support and new frame parameters for transparency and blur.

<p><a href="https://lobste.rs/s/2avtyb/liquid_glass_effect_for_gnu_emacs">Comments</a></p>
Original Article
View Cached Full Text

Cached at: 08/04/26, 05:48 PM

larrasket/emacs-liquid-glass

Source: https://github.com/larrasket/emacs-liquid-glass

#+title: Emacs Liquid Glass

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:

#+begin_src conf background-opacity = 0.01 background-blur = macos-glass-regular #+end_src

This is not a dark overlay or a hard-coded theme. The patch adds native =NSGlassEffectView= support only.

[[file:screenshot.png]]

For the longer write-up, see [[https://lr0.org/blog/p/emacs-apple-glass/][the blog post]].

  • What This Builds :PROPERTIES: :CUSTOM_ID: what-this-builds :END:

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:

  1. =frame-transparency= from =d12frosted/emacs-plus=
  2. =patches/ns-glass-effect.patch= from this repo

The local patch adds these frame parameters:

| Parameter | Purpose | |—————————+––––––––––––––––––––––––––| | =ns-glass-material= | Native material, currently =regular=, =clear=, or =nil=. | | =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.

  • Quick Start :PROPERTIES: :CUSTOM_ID: quick-start :END:

Install from your tap:

#+begin_src sh brew tap larrasket/emacs-liquid-glass https://github.com/larrasket/emacs-liquid-glass.git brew emacs-liquid-glass install #+end_src

Skip copying the rebuilt app bundle into =/Applications=:

#+begin_src sh brew emacs-liquid-glass install –no-copy-app #+end_src

Direct clone usage also works:

#+begin_src sh git clone https://github.com/larrasket/emacs-liquid-glass cd emacs-liquid-glass ./install.sh #+end_src

Use =./install.sh –no-copy-app= if you do not want it to update =/Applications/Emacs.app= and =/Applications/Emacs Client.app=.

  • Manual Build :PROPERTIES: :CUSTOM_ID: manual-build :END:

Copy the patch and build config:

#+begin_src sh 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 #+end_src

Build Emacs from source:

#+begin_src sh 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 #+end_src

Copy the app bundles used by Spotlight and =/opt/homebrew/bin/emacs=:

#+begin_src sh 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/” #+end_src

  • Emacs Config :PROPERTIES: :CUSTOM_ID: emacs-config :END:

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:

#+begin_src sh brew emacs-liquid-glass path #+end_src

Example:

#+begin_src elisp (add-to-list ’load-path “/path/to/emacs-liquid-glass/lisp”) (require ’lr-macos-glass) #+end_src

The regular preset currently uses:

#+begin_src elisp (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) #+end_src

Interactive commands:

| Command | Effect | |———————————+———————————————————–| | =M-x salih/set-glass-style= | Switch between =macos-glass-regular= and =macos-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.

  • Verification :PROPERTIES: :CUSTOM_ID: verification :END:

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

#+begin_src sh strings /Applications/Emacs.app/Contents/MacOS/Emacs
| rg ‘ns-alpha-glyphs-alpha|ns-glass-material|ns-glass-saturation’ #+end_src

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=.

  • Notes :PROPERTIES: :CUSTOM_ID: notes :END:

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.

Similar Articles

I built a GPU back end for Emacs

Hacker News Top

The author describes building a GPU-based display backend for Emacs using Metal on macOS and OpenGL on Linux, improving rendering performance and enabling new effects like video playback and animated cursors, without modifying the core redisplay engine.

The Emacsification of Software

Hacker News Top

The author discusses the frustration of reading Markdown in the terminal and describes using Claude to quickly build a custom macOS Markdown viewer (MDV.app), illustrating how AI enables rapid creation of personal software tools.