Skip to content

Repository files navigation

Focus

A quick GNOME extension for apply transparency to inactive windows.

demo

Settings

Open Focus from the GNOME Extensions app to configure opacity, inactive-window effects, special focus windows, and exclusions.

Special Focus Windows

Use the Special Focus Windows preferences page to add or remove windows that should use the special focused opacity while active.

Excluded Windows

Use the Excluded Windows preferences page to add or remove exact criteria. A window is excluded when a criterion exactly matches any of:

  • its WM_CLASS
  • its WM_CLASS instance
  • its full window title

Both lists use exact, case-sensitive matches against a window's WM_CLASS, WM_CLASS instance, or full title. On X11, xprop WM_CLASS can show the class and instance; GNOME Shell's Looking Glass can help inspect windows on Wayland. Blank entries are not stored, duplicate entries are removed, and changes apply immediately while the extension is enabled.

Legacy JSON Lists

Existing JSON lists remain supported and are merged with the corresponding preferences. Focus reads them from ~/.config/focus@scaryrawr.github.io/, falling back to the legacy ~/.config/Focus/ directory when the preferred directory is absent. Each file must contain a JSON array of strings; invalid files are ignored with a warning in the GNOME Shell log.

special_focus.json adds special focus windows:

["Code", "Code - Insiders"]

ignore_focus.json adds excluded windows. This example lets Firefox's Picture-in-Picture keep its normal appearance:

["Toolkit"]

Installing

GNOME Extensions - Focus

Repo Guide

The build uses GJS type definitions, Rolldown, Oxlint, native TypeScript, and Oxfmt. Building works on non-Linux systems, but local extension installation requires Linux and GNOME Shell.

Prerequisites

Use Node.js 22 and the pnpm 11 version pinned in package.json.

corepack enable
pnpm install --frozen-lockfile

Quality checks

pnpm lint

Build

pnpm build

Packaging for GNOME Extensions

pnpm build:package

Installing Locally

pnpm package:install

About

Apply transparency to inactive windows

Resources

Stars

20 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages