Skip to content

hmmhmmhm/zen-transparency-patch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌊 Zen Browser Transparency Patch

Keep the vibrancy alive, even when unfocused

macOS Frida License

Zen Browser with Always-On Transparency


🎯 Problem

On macOS, Zen Browser's beautiful transparency/vibrancy effect only works when the window is focused. When you switch to another app, the transparency disappears and the window becomes opaque gray.

✨ Solution

This Frida script hooks into macOS's window management to make Zen Browser think it's always focused, keeping the transparency effect active at all times.

πŸ“‹ Requirements

Requirement Details
πŸ’» macOS 14.0+ (may work on earlier versions)
πŸ”“ SIP Must be disabled (required for Frida)
🌐 Zen Browser Latest version installed
🐍 Python For Frida installation

πŸš€ Quick Start

0️⃣ Configure Zen Browser (Required)

Before installing the patch, you must configure Zen Browser settings:

  1. Open Zen Browser
  2. Navigate to about:config in the address bar
  3. Set the following preferences:
    • browser.tabs.allow_transparent_browser β†’ true
    • zen.view.grey-out-inactive-windows β†’ false

⚠️ Important: These settings are required for the transparency patch to work correctly.

1️⃣ Install Required Extensions (Required)

The following Zen Browser extensions must be installed and configured:

  • 🎨 Transparent Zen extension
  • 🌐 Zen Internet extension

⚠️ Important: Both extensions are required for the transparency patch to function properly.

2️⃣ Disable SIP (Required, one-time)

  1. Restart your Mac and hold Command + R to enter Recovery Mode
  2. Open Utilities > Terminal
  3. Run: csrutil disable
  4. Restart your Mac

⚠️ Warning: Disabling SIP reduces system security. Re-enable after use if needed.

3️⃣ Install Frida

pip3 install frida-tools

4️⃣ Clone and Install

git clone https://github.com/hmmhmmhm/zen-transparency-patch.git
cd zen-transparency-patch
sudo ./install-daemon.sh

The installer will:

  • βœ… Automatically detect your Frida installation path
  • βœ… Set up automatic patching when Zen Browser launches
  • βœ… Start the daemon immediately

5️⃣ Done! πŸŽ‰

Open Zen Browser and enjoy the always-transparent vibrancy!


πŸ’» Usage

πŸ“Š Check Logs

tail -f ~/zen-transparency-patch/patch.log

πŸ”§ Manual Run (Alternative)

# Start Zen Browser first, then:
sudo $(which frida) -n zen -l zen-transparency.js

πŸ” How It Works

The script hooks into these macOS methods:

Method Effect
NSWindow.isKeyWindow Returns true always
NSWindow.isMainWindow Returns true always
_hasKeyAppearance Forces key appearance (private API)
_hasMainAppearance Forces main appearance (private API)
_shouldRenderAsActive Always renders as active (private API)

This tricks NSVisualEffectView into rendering as if the window is always active, maintaining the beautiful transparency effect.


πŸ—‘οΈ Uninstall

cd ~/zen-transparency-patch
sudo ./uninstall-daemon.sh

To re-enable SIP:

  1. Restart in Recovery Mode (Command + R)
  2. Run: csrutil enable
  3. Restart

πŸ”§ Troubleshooting

❌ "Failed to attach: unable to access process"

SIP is not disabled. Check with:

csrutil status
# Should show: disabled

❌ "Frida not found"

Make sure Frida is installed:

pip3 install frida-tools

❌ Patch not applying automatically

Check the logs:

cat ~/zen-transparency-patch/patch.log
cat ~/zen-transparency-patch/daemon-err.log

πŸ“„ License

MIT License - see LICENSE for details.


πŸ™ Credits

  • πŸ€– Created with assistance from Claude (Anthropic)
  • πŸ”§ Uses Frida for dynamic instrumentation
  • 🌐 Made for Zen Browser

πŸ”— Related Links

Zen Browser Frida Issues


⭐ If this helped you, consider starring the repo!

Made with ❀️ for the Zen Browser community

About

Zen Browser Transparency Patch for macOS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published