Skip to content

hmmhmmhm/zen-transparency-patch

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_browsertrue
    • zen.view.grey-out-inactive-windowsfalse

⚠️ 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