From 19cfadfe6684a6c105ac0c4b3e4ba168ef02f123 Mon Sep 17 00:00:00 2001
From: Ishan Malu
Date: Fri, 4 Sep 2026 21:27:45 +0300
Subject: [PATCH 1/2] Make the brightness slider and Night Mode act on the page
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The Screen tab demo had a brightness slider drawn at 100 with a knob
painted at zero, and a Night Mode toggle that only wrote a caption. Both
are now live: dragging the slider dims the page, and Night Mode warms it.
Brightness reuses the app's own mechanism rather than approximating it.
Where Perch has no backlight to move it floats a black overlay above
everything, click-through, clamped at 0.85 so the slider never disappears
(Brightness.swift). The page does the same with a fixed scrim.
Night Mode needs two layers. Multiply takes the blue out of anything
light, but against a near-black backdrop it multiplies to near-black, so
the dark theme would not shift at all. A screen layer lifts red and green
in the shadows, and the pair reads as one warm ramp in either theme.
The slider is a real slider: pointer drag with capture, arrow and page
keys, Home and End, and the ARIA a span with a click handler was missing.
It is captioned "in the panel" because brightness has no shortcut —
nudgeAll() in Brightness.swift is unreferenced.
Also fixes the scrim being declared after the script that looks for it,
which left the whole block skipped.
---
docs/index.html | 125 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 120 insertions(+), 5 deletions(-)
diff --git a/docs/index.html b/docs/index.html
index 0052d74..d82f6a3 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -364,6 +364,38 @@
position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%;
background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transform: translate(-50%,-50%);
}
+ /* The brightness slider is the one control on the page that acts on the page.
+ Widened hit area: a 3px track is honest to the app but hopeless to grab. */
+ #brightSlider { cursor: grab; touch-action: none; }
+ #brightSlider::before { content: ''; position: absolute; inset: -9px 0; }
+ #brightSlider.drag { cursor: grabbing; }
+ #brightSlider:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 2px; }
+
+ /* Perch dims a non-built-in display with a black overlay window pinned above
+ everything, click-through, never past 0.85 so the slider stays findable
+ (Brightness.swift). This is the same trick, scoped to the page. */
+ #dimmer {
+ position: fixed; inset: 0; z-index: 9999; pointer-events: none;
+ background: #000; opacity: 0;
+ }
+ /* Night Mode shifts the gamma ramps warm. Multiply against an amber pane is
+ the closest a web page gets: it pulls the blues down instead of laying a
+ haze over everything, which is what a plain translucent overlay does. */
+ #warmer, #warmLift {
+ position: fixed; inset: 0; pointer-events: none; opacity: 0;
+ transition: opacity .45s ease;
+ }
+ /* Multiply pulls the blues out of everything light. On its own that is all a
+ warm overlay can do — against a near-black background it multiplies to
+ near-black, so a dark page would not shift at all. */
+ #warmer { z-index: 9998; background: #ff9526; mix-blend-mode: multiply; }
+ /* So the shadows get the other half of a gamma shift: screen lifts red and
+ green where there is nothing to take blue away from. Together the two read
+ as one warm ramp in either theme. */
+ #warmLift { z-index: 9997; background: #2b1600; mix-blend-mode: screen; }
+ @media (prefers-reduced-motion: reduce) {
+ #warmer, #warmLift { transition: none; }
+ }
/* ---------- layout tiles ----------
The app draws a 26pt tile glyph for each window action, then a divider and
@@ -567,6 +599,10 @@
+
+
+
+
@@ -774,7 +796,7 @@
Put windows where you want them
- Perch 1.8.0 — up to date
+ Perch 1.9.1 — up to dateCheck
@@ -787,9 +809,11 @@
Put windows where you want them
02 — SYSTEM
Know what your Mac is doing
Click CPU and you get per-core load and the processes driving it,
- helpers grouped under the app that owns them. Click GPU, memory, disk or
- network and you get the same treatment for each. End a runaway process
- without opening Activity Monitor, and pin any figure next to the clock.
+ helpers grouped under the app that owns them. GPU, memory, disk, network
+ and sound each get the treatment that suits them — a ranked list where
+ ranking means something, plain figures where it does not. End a runaway
+ process without opening Activity Monitor, and pin any figure next to the
+ clock.
- Perch 1.8.0 — up to date
+ Perch 1.9.1 — up to dateCheck
@@ -866,7 +890,7 @@
The small stuff, one click away
- Perch 1.8.0 — up to date
+ Perch 1.9.1 — up to dateCheck
@@ -886,7 +910,7 @@
Everything in the box
Custom layoutsFive presets that tile your frontmost windows at once.
Alt-Tab switcherLive window previews, type to filter, close or quit inline.
Clipboard historySearchable, pinnable, with image previews and source apps.
-
System monitoringCPU, memory, disk, network, battery health, thermals.
+
System monitoringCPU, GPU, memory, disk, network, battery health, thermals.
Disk cleaningSixteen cache targets plus your own. Always to the Trash.
Screen cleaningFlat colours that double as a dead-pixel test.
Keyboard cleaningInput locked on a countdown so you can wipe the keys.
@@ -895,6 +919,7 @@
Everything in the box
Updates install themselvesPerch replaces itself and restarts. The new build must be signed by the same key as the running one, or it is refused before anything moves.
Night mode6500K to 2400K via display gamma. Manual or scheduled.
BrightnessPer display, including external monitors over any cable.
+
SoundOutput level and mute, switch between outputs, and see which apps are actually making noise. No per-app sliders: macOS exposes no volume on a process, and the only way round it is shipping an audio driver.
Keep awakeHold it open, or for 15 minutes to 8 hours with the time left on the row. It can start itself while plugged in, while an app runs, or while the CPU is busy, and let the display sleep while the machine works.
@@ -1020,7 +1045,7 @@
Press ⌃⌥Space
Needs Swift 6 and the macOS SDK. Command Line Tools are enough — full Xcode is not required.
Builds, runs the self-test, installs to /Applications and launches it.
@@ -1037,7 +1062,7 @@
Privacy
Keystrokes are counted, never recordedThe cleaning modes discard every event they swallow. Key codes are never stored or logged.
Clipboard history stays localOwner-only permissions. Password managers and credential-shaped strings are skipped.
-
Two network features, both manualThe update check talks to GitHub. The speed test fetches a block of bytes from Cloudflare when you press Run. Nothing else opens a socket.
+
Every network call is one you asked forChecking for an update, and downloading it, talk to GitHub. The speed test fetches a block of bytes from Cloudflare when you press Run. Nothing else opens a socket.
Disk cleaning cannot go rogueA path guard rejects system and home directories. Removal is always to the Trash.
Accessibility reads geometry, not contentWindow positions, sizes, titles and app names. Never what is inside a window.
Window previews are optionalCaptured only while the switcher is open, held in memory, never written to disk.
@@ -1047,7 +1072,8 @@
Privacy
Every release ships a checksum, and you can run the built-in checks yourself with
Perch --selftest.
-
+