README.md (5963B)
1 # Glass — transparent Vesktop for macOS 2 3 Makes Discord (via [Vesktop](https://github.com/Vencord/Vesktop)) **frosted-transparent on macOS**, while keeping Discord's default look. Opacity only — no recoloring. 4 5 ![it's see-through; that's the whole pitch]() 6 7 --- 8 9 ## Enable it (2 minutes) 10 11 ### Step 1 — turn on the window transparency 12 A theme **cannot** do this part; it's a Vesktop window setting. 13 14 1. Open Vesktop → **Settings** (Vesktop/Vencord settings, the cog). 15 2. **Transparent Window** → **ON**. 16 3. **macOS Vibrancy Style** → **`sidebar`**. *(Use `sidebar`, not `under-window`: on the test machine `sidebar` is the one that reliably **held** the transparent state across focus/redraw — `under-window` tended to drop the frost. If `sidebar` misbehaves on your setup, `under-window` is the fallback to try.)* 17 4. **Fully quit Vesktop and reopen it** — ⌘Q, not just close. (This setting only applies on a fresh launch.) 18 19 ### Step 2 — add the theme (pick ONE) 20 21 **A. QuickCSS (most reliable — recommended):** 22 Settings → open the **QuickCSS** editor → paste the entire contents of [`Glass.theme.css`](Glass.theme.css) → save. Done. 23 QuickCSS is injected *inline* at startup, so it loads on every cold start, deterministically. 24 25 **B. Online link (convenient, auto-updates):** 26 Settings → **Themes** → paste this into the online-themes box, press enter, tick it on: 27 ``` 28 https://raw.githubusercontent.com/ganten7/vesktop-glass/main/Glass.theme.css 29 ``` 30 31 **C. Local file:** 32 Settings → **Themes** → **Open Themes Folder** → drop in [`Glass.theme.css`](Glass.theme.css) → tick its checkbox. 33 34 That's it. You should see your desktop frosted through Discord. 35 36 > **Heads-up on B and C:** Vesktop loads themes (files *and* online links) via `@import`, which has a cold-start race — once in a while it silently fails to inject on launch and you'll see window transparency but no frost on the surfaces. If that happens, toggle the theme off/on in Settings → Themes (re-injects instantly). **Option A (QuickCSS) sidesteps this entirely** — use it if you want set-and-forget. 37 38 --- 39 40 ## Requirements 41 - **macOS** + **Vesktop** (does *not* work on the official Discord app — only Vesktop can make the window transparent). 42 - **System Settings → Accessibility → Display → Reduce Transparency = OFF.** If this is on, macOS disables *all* transparency. 43 44 > ### ⚠ Honest scope: confirmed on exactly **one** machine 45 > Everything here was built and verified on a single setup: 46 > - **MacBook Pro (Mac17,9), Apple M5 Pro** 47 > - **macOS 26.5 (Tahoe, build 25F71)**, arm64 48 > - **Vesktop 1.6.5** 49 > 50 > That's the *only* configuration I've actually tested. The theme is plain CSS and the 51 > vibrancy API is long-standing, so I *expect* it to work on other Macs and 52 > on Sonoma/Sequoia — but I have **not** verified that, and the optional patch script is 53 > resilient-by-design rather than proven across versions. If you run it elsewhere, a quick 54 > note (works / breaks + your specs) via an issue or PR helps everyone. Treat anything 55 > beyond the config above as "should work," not "known to work." 56 57 --- 58 59 ## Tinkering — how transparent? 60 61 Open `Glass.theme.css`. The only two knobs are at the very top: 62 63 ```css 64 --glass: 0.55; /* surfaces: 0 = fully see-through, 1 = solid Discord */ 65 --glass-menus: 0.90; /* menus/popouts: keep high so they stay readable */ 66 ``` 67 68 Change the numbers and save. The **local file** hot-reloads instantly; the **online link** updates when you toggle it off/on. Lower `--glass` = more see-through. That's the whole knob — everything else scales from it. 69 70 --- 71 72 ## ⚠ Known limitation: frost dims when unfocused 73 74 By default the frost **flattens to opaque whenever the Vesktop window loses focus**. That's not this theme — it's Vesktop never setting Electron's `visualEffectState`, so macOS deactivates the vibrancy when the window isn't frontmost. Clicking back restores it. Purely cosmetic. 75 76 If that bugs you, there's an **optional** fix below. 77 78 --- 79 80 ## Optional — make the frost *persistent* (advanced) 81 82 `scripts/enable-frost.sh` patches your local Vesktop so the vibrancy stays active even when unfocused (it injects `visualEffectState: "active"` into the window options). It is **environment-aware**, backs everything up, and re-signs the app preserving entitlements (so mic/camera keep working). 83 84 ```bash 85 # from the repo root 86 chmod +x scripts/*.sh 87 ./scripts/enable-frost.sh # interactive; prints what it sees, asks before patching 88 ./scripts/enable-frost.sh --yes # no prompt 89 ./scripts/enable-frost.sh --revert # undo (restores the backup) 90 ``` 91 92 **What it does:** finds Vesktop → backs up `app.asar` + `Info.plist` → injects the option (matched by pattern, so it survives Vesktop's minified rebuilds) → repacks the asar → recomputes the `ElectronAsarIntegrity` hash → ad-hoc re-signs the bundle. 93 94 **Caveats — read these:** 95 - Needs **Node.js** (`brew install node`) and Xcode CLT (`xcode-select --install`) for the asar tooling + `codesign`. 96 - It modifies and re-signs `Vesktop.app`. Backups are made; `--revert` restores them. 97 - A **Vesktop update replaces `app.asar`**, so re-run the script after updating. 98 - macOS may re-prompt for mic/screen permission once after re-signing — just allow it. 99 100 If the script can't find the vibrancy assignment (a future Vesktop refactor), it restores the original untouched and tells you — please open an issue with your Vesktop version. 101 102 --- 103 104 ## How it works (for the curious) 105 Discord's 2025 "visual refresh" paints surfaces from `--background-base-*`, `--bg-overlay-*`, and (with a custom background set) opaque `--background-gradient-*` *images*. Glass overrides all of those — plus the legacy `--background-*` — with translucent versions of Discord's own dark tones, and strips the opaque backing off the app frame so the macOS vibrancy shows through. No text or accent colors are touched. 106 107 ## License 108 MIT. Frost responsibly.