Skip to content

Lighter v2: per-side borders, profiles, auto-switching, OSS tooling - #2

Merged
joaoferrete merged 1 commit into
mainfrom
jf-add-profiling
Jul 14, 2026
Merged

Lighter v2: per-side borders, profiles, auto-switching, OSS tooling#2
joaoferrete merged 1 commit into
mainfrom
jf-add-profiling

Conversation

@joaoferrete

Copy link
Copy Markdown
Owner

Summary

Restructures Lighter into a modular, open-source-ready v2 and adds the two headline features: independent border thickness per side and named profiles with optional automatic switching.

Features

  • Per-side thickness — top/bottom/left/right adjust independently (0 disables a side), with a "Link sides" mode; the old single thickness key is migrated automatically on first enable (lib/migrations.js).
  • Profiles — save the current appearance as a named profile (e.g. Google Meet), stored as JSON in the profiles GSettings key; apply/rename/duplicate/delete from the new Profiles preferences page or the panel menu (lib/profileManager.js, preferences/profilesPage.js).
  • Auto-switching — optionally apply a profile when a matching window gets focused, by app id and/or window-title regex (works for Meet in a browser tab via title-change tracking), with priority tie-breaking and a default-profile fallback (lib/windowWatcher.js).

Architecture & fixes

  • Monolithic extension.js split into lib/ (shell side) and preferences/ (GTK side); shared modules kept free of UI imports.
  • Deprecated Clutter.Color (removed in GNOME 47) replaced by St.Widget + CSS; Gtk.ColorButton replaced by Gtk.ColorDialogButton.
  • Missing maximize-brightness listener fixed; prefs keybinding narrowed to ActionMode.NORMAL; disable() hardened (EGO review checklist).

Tooling

  • Makefile (build/lint/pot/pack/install/nested) — make install refuses to run over a symlinked installation, which previously caused the working copy to be deleted through the symlink.
  • ESLint (GNOME style) passing clean; GitHub Actions CI (lint + schema validation + pack artifact).
  • gettext i18n scaffolding with a complete pt_BR translation; CONTRIBUTING.md, CHANGELOG.md, rewritten README.md.

Test plan

  • Extension loads ACTIVE in a headless GNOME Shell 46 session (gnome-shell --headless)
  • 3× enable/disable cycles with zero JS errors in the shell log
  • Settings migration verified against real user data (thickness=200 → four per-side keys, settings-version=2)
  • ProfileManager logic covered by unit tests with a mocked Gio.Settings (create/update/apply/duplicate/delete, corrupted-JSON fallback, forward compat)
  • make pack produces a clean zip (no gschemas.compiled, pt_BR .mo compiled in)
  • Visual check of the preferences UI after a shell restart

🤖 Generated with Claude Code

…oling

Features:
- Independent thickness per side (top/bottom/left/right, 0 disables a side),
  with optional linked mode and automatic migration from the old single
  'thickness' key
- Named profiles stored as JSON in GSettings: create/apply/rename/duplicate/
  delete from a new Profiles preferences page and the panel menu
- Optional automatic profile switching by focused window (app id and/or
  window title regex, with priority and default-profile fallback)

Architecture:
- Split monolithic extension.js into lib/ (borderManager, profileManager,
  windowWatcher, brightness, colorUtils, indicator, migrations) and
  preferences/ (generalPage, profilesPage)
- Replace deprecated Clutter.Color with St.Widget + CSS (GNOME 47 ready)
  and Gtk.ColorButton with Gtk.ColorDialogButton
- Fix missing maximize-brightness listener; keybinding now ActionMode.NORMAL

Tooling:
- Makefile (build/lint/pot/pack/install/nested) with a guard preventing
  'make install' from deleting the repo through a symlinked installation
- ESLint (GNOME style), GitHub Actions CI, gettext i18n with full pt_BR
  translation, CONTRIBUTING.md, CHANGELOG.md, rewritten README

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@joaoferrete joaoferrete self-assigned this Jul 14, 2026
@joaoferrete
joaoferrete merged commit bcf4d05 into main Jul 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant