asmvik / asmvik/yabai

Window margins

Open
#1,249 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
29.6k
Forks
758
PR merge metrics
No merged PRs in 30d

Description

Related: #682

Proposal: allow configuring margins on a per-window basis. Margins designate space within the area the window would otherwise be rendered which will be left empty.

Rationale: external tools can use margins to allocate space in which to draw window decorations.

From an API perspective, I think this would look something like adding a `--margin abs|rel:top:right:bottom:left` command to the window domain, and adding a `"margin"` property to the data returned when querying windows. The `"frame"` property would probably continue to report where the actual window is rendered, rather than the full space including the margin.

I'm not sure exactly how this would interact with some edge cases around minimum window sizes.

I may have some cycles to implement this if it would be merged.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the related issue #682 and tracing the window-domain command handling and window-query data described here. Define how per-window absolute and relative margins interact with minimum window sizes, then verify that the margin property is reported while the frame remains the actually rendered area.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.