Skip to content

Modes: open apps, arrange windows and quiet distractions in one click - #13

Merged
alexandre-wayss merged 1 commit into
mainfrom
feat/modes
Sep 24, 2026
Merged

alexandre-wayss merged 1 commit into
mainfrom
feat/modes

Conversation

@alexandre-wayss

Copy link
Copy Markdown
Collaborator

Summary

A new Modes tab. A mode (e.g. "Studying") has:

  • Apps and windows: the apps to open. Arrange their windows the way you like and press Use current window layout; Brisa remembers each window's position and size. An Open these apps button helps set it up.
  • Sound and focus: an optional sound (scene, suggestion, saved mix or single sound, same picker as Routines) and an optional focus session.
  • Distractions: apps to leave alone, hide or quit while the mode is on.
  • When the mode ends: sounds and the focus timer always stop, and hidden apps come back. The mode's own apps are left open, minimized or quit, depending on the mode's setting.

Starting a mode opens any apps that aren't running, waits for their windows and moves them into place. The first app ends up in front. A saved placement is skipped if it would land on a display that isn't connected. Switching from one mode to another keeps the apps both modes use. Brisa and the Finder are never hidden, quit or minimized.

Where to start and end modes

  • the Modes tab (Start / End mode on each card, with the active mode highlighted)
  • the menu bar player (new "Mode" row)
  • Routines: new actions "Start a mode" and "End the current mode"
  • Shortcuts and Siri ("Start Studying in Brisa", "End Mode"), in signed builds only, like the other actions

Permissions: moving, reading and minimizing windows uses the Accessibility API, the same permission the interaction sounds already ask for. Without it, modes still open, hide and quit apps; minimize falls back to hiding the app. Full-screen windows and other Spaces can't be moved by apps.

How it was tested

  • ./Scripts/test.sh: 57 passed, 11 of them new. They cover which distracting apps are handled, which apps are put away when a mode ends or switches, never touching Brisa or the Finder, conversion from screen coordinates to Accessibility coordinates, rejecting off-screen placements, saving modes, and the new routine actions.
  • Rendered the Modes page, the editor and the menu bar to check the layout.
  • ./Scripts/build.sh succeeds.
  • Not yet tested against real windows: this environment doesn't have Accessibility access, so capturing and restoring windows needs a test in the installed app.

- A mode lists apps to open and remembers where their windows go: arrange
  them once and press "Use current window layout". Starting the mode opens
  missing apps, waits for their windows and puts them back through the
  Accessibility API, skipping placements on displays that aren't connected.
- Distracting apps can be left alone, hidden or quit while the mode is on.
- Optional sound (any scene, suggestion, mix or single sound) and focus
  session.
- Ending a mode always stops sounds and the focus timer, shows the apps it
  hid, and leaves open, minimizes or quits its apps. Switching modes keeps
  apps both use. Brisa and the Finder are never touched.
- Start and end from the Modes tab, the menu bar, routines ("Start a mode",
  "End the current mode") and, in signed builds, Shortcuts and Siri.
- Routines and Modes share one sound picker and one "play a sound choice".
- 11 tests for which apps are hidden, quit or kept, coordinate conversion,
  off-screen placements and saving.
@alexandre-wayss
alexandre-wayss merged commit 417457f into main Sep 24, 2026
1 check passed
@alexandre-wayss
alexandre-wayss deleted the feat/modes branch September 24, 2026 19:30
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