electron-overlay-dimming
Reusable pattern for focus-based auto-dimming of Electron overlay windows — when the app loses focus, all overlay windows fade to a low opacity; when an…
Skill by sonichi
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sonichi-electron-overlay-dimming
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/electron-overlay-dimming
What's inside
- Skill name
electron-overlay-dimming- Description
- Reusable pattern for focus-based auto-dimming of Electron overlay windows — when the app loses focus, all overlay windows fade to a low opacity; when an overlay regains focus, they return to their configured opacity. Use when building always-on-top Electron overlays that should recede while the user works in other apps.
- License
- MIT
- Instructions
- 69 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- manifest.json
SKILL.md (first lines)
# Electron Overlay Auto-Dimming
A small, self-contained pattern for always-on-top Electron overlays: the
overlays stay readable while in use but **fade out of the way** when the user
clicks into another application, and **restore** when focus returns to an
overlay. First shipped in the `benchmark-overlay` app.
## Behaviour
- App loses focus (no overlay window is focused) → every overlay window's
opacity drops to a dim level (~0.2).
- Focus returns to any overlay → every overlay restores to its *configured*
opacity (not blindly to 1.0 — it respects any per-overlay opacity the user
set).
## Why it's not naive
Two pitfalls the pattern handles:
1. **Inter-overlay clicks.** Clicking from overlay A to overlay B fires a
`blur` then a `focus`. Dimming on raw `blur` would flicker. The fix: on
`blur`, defer ~80 ms and only dim if `BrowserWindow.getFocusedWindow()` is
then `null` — i.e. the *app* truly lost focus, not just one window.
2. **Configured opacity.** Overlays may each have a user-set base opacity.
Auto-dim must dim *from* and restore *to* that value, so opacity is always
computed as `appDimmed ? DIM_OPACITY : overlay.config.opacity`.
## Reference implementation (main process)
```js
const DIM_OPACITY = 0.2;
let appDimmed = false;
function effectiveOpacity(o) {
return appDimmed ? DIM_OPACITY : o.config.opacity;
}
function applyOpacityAll() {
for (const o of Object.values(OVERLAYS)) {
if (o.win && !o.win.isDestroyed()) o.win.setOpacity(effectiveOpacity(o));
}
}
app.on('browser-window-focus', () => {
if (appDimmed) { appDimmed = false; applyOpacityAll(); }
});
app.on('browser-window-blur', () => {
// Defer so an A→B overlay click doesn't briefly dim.
setTimeout(() => {
if (!appDimmed && !BrowserWindow.getFocusedWindow()) {
appDimmed = true;
applyOpacityAll();
}
}, 80);
});
```
Any code path that sets a window's opacity (e.g. a config handler) must route
through `effectiveOpacity()` so opacity changes made while dimmed don't undim
the window.
## Reference app
Live implementation: `~/projects/benchmark-overlay/main.js` — the
`benchmark-overlay` app applies this across three overlay windows (AI
Benchmarks, System Resources, Hub Overlay).From sonichi/sutando, MIT.
More from sonichi/sutando
- 0.757score
owner-agent-consult
sonichi
Before answering your OWNER, when the answer genuinely depends on something another agent of the same owner holds and you do not, ask that one agent once…
SkillAFreshness: A★ 400Claude Code +9 - 0.757score
marketplace
sonichi
Install marketplace skills, activate cloud tools, check whether installed skills are up to date, or remove them — without the owner opening the Marketplace.
SkillAFreshness: A★ 400Claude Code +9 - 0.757score
tutorial
sonichi
Show a new owner what to try first.
SkillAFreshness: A★ 400Claude Code +9 - 0.757score
macos-tools
sonichi
macOS native integrations: screen capture, calendar, reminders, contacts, email (Mail.app), Spotlight search.
SkillAFreshness: A★ 400Claude Code +9 - 0.757score
import-claude-context
sonichi
Bring the owner's Claude Code history into Sutando: index, extract and haiku-summarise the stock ~/.claude/projects transcripts, stage the result, show the…
SkillAFreshness: A★ 400Claude Code +9 - 0.757score
image-generation
sonichi
Generate an image from a prompt or edit an existing one (Gemini image model, standard library only, any Gemini key the resolver finds) and attach the file to…
SkillAFreshness: A★ 400Claude Code +9 - 0.757score
connect-apps
sonichi
Use when the owner asks about their calendar, email, meetings, Linear, Notion, Slack, Google Drive, GitHub or any other third-party app or the data in it…
SkillAFreshness: A★ 400Claude Code +9 - 0.754score
deal-finder
sonichi
Scan configured sources (Craigslist now; eBay + Facebook Marketplace planned) for used-item listings matching the owner's criteria.
SkillAFreshness: A★ 400Claude Code +9 - 0.754score
quota-tracker
sonichi
Track Claude Code quota usage via Anthropic API rate limit headers.
SkillAFreshness: A★ 400Claude Code +9 - 0.754score
model-switch
sonichi
Change the core's model without the CLI: send /model to the live core's pane through the shared sender, wait for the CLI to accept it (answering its confirm…
SkillAFreshness: A★ 400Claude Code +9 - 0.754score
claude-gemini
sonichi
Use the local Antigravity CLI (agy, Gemini-backed) from Claude Code with the user's existing Gemini authentication or API configuration.
SkillAFreshness: A★ 400Claude Code +9 - 0.754score
phone-conversation
sonichi
Make conversational phone calls and join Zoom meetings via Twilio + Gemini.
SkillAFreshness: A★ 400Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 400
- Forks
- 98
- Open issues
- 1,202
- Last commit (this folder)
- Jul 3, 2026 (3 months ago)
- Last release
- Aug 20, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/sonichi/sutando
- Website
- sutando.ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from sonichi
- 0.757score
import-claude-context
sonichi
Bring the owner's Claude Code history into Sutando: index, extract and haiku-summarise the stock ~/.claude/projects transcripts, stage the result, show the…
SkillAFreshness: A★ 400Claude Code +9 - 0.757score
marketplace
sonichi
Install marketplace skills, activate cloud tools, check whether installed skills are up to date, or remove them — without the owner opening the Marketplace.
SkillAFreshness: A★ 400Claude Code +9 - 0.757score
connect-apps
sonichi
Use when the owner asks about their calendar, email, meetings, Linear, Notion, Slack, Google Drive, GitHub or any other third-party app or the data in it…
SkillAFreshness: A★ 400Claude Code +9 - 0.757score
image-generation
sonichi
Generate an image from a prompt or edit an existing one (Gemini image model, standard library only, any Gemini key the resolver finds) and attach the file to…
SkillAFreshness: A★ 400Claude Code +9 - 0.757score
macos-tools
sonichi
macOS native integrations: screen capture, calendar, reminders, contacts, email (Mail.app), Spotlight search.
SkillAFreshness: A★ 400Claude Code +9 - 0.757score
owner-agent-consult
sonichi
Before answering your OWNER, when the answer genuinely depends on something another agent of the same owner holds and you do not, ask that one agent once…
SkillAFreshness: A★ 400Claude Code +9
Cite this page
electron-overlay-dimming skill. Agent Mart. https://agentmart.dev/skills/sonichi-electron-overlay-dimming (last updated 2026-10-24)