Skip to content

feat: per-window theme overrides - #1128

Closed
michaeladler wants to merge 1 commit into
mahkoh:masterfrom
michaeladler:feat/border-window-rule
Closed

michaeladler wants to merge 1 commit into
mahkoh:masterfrom
michaeladler:feat/border-window-rule

Conversation

@michaeladler

@michaeladler michaeladler commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Theme properties can now be overridden per window via window rules, e.g.:

[[windows]]
match.app-id = "mpv"
action = { type = "set-window-theme", theme.border-width = 0 }

If several rules override the same property of a window, the rule that appears last takes precedence.

Comment thread toml-spec/spec/spec.yaml Resolved
Comment thread jay-config/src/_private/ipc.rs Resolved
@michaeladler
michaeladler force-pushed the feat/border-window-rule branch from 4dee036 to 6417198 Compare July 24, 2026 14:51
@michaeladler michaeladler changed the title feat: add border-width window rule option feat: set-floating-border-width window rule action Jul 29, 2026
@mahkoh

mahkoh commented Jul 30, 2026 •

Copy link
Copy Markdown
Owner

Sorry I was mistaken about this being a separate action. This size should be configured just like any other size. I.e. it should closely follow the existing border-width, bar-height, etc. settings. No new action is required for this.

@mahkoh

mahkoh commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Forget my previous comment. I had forgotten that this was supposed to be a per-window setting. In that case some more machinery might be required. We will probably want to build some general-purpose machinery that allows arbitrary theme settings to be overwritten on per-window basis. While this action would be ok for this particular situation, it would not do if in the future we want other things, like the border color, to be settable for each window.

@michaeladler
michaeladler force-pushed the feat/border-window-rule branch from 6417198 to d803b1e Compare July 31, 2026 10:26
@michaeladler michaeladler changed the title feat: set-floating-border-width window rule action feat: per-window theme overrides Jul 31, 2026
@michaeladler

michaeladler commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor Author

I like that idea. I've updated my branch to allow per-window theme overrides. Seems to work fine so far. Once we agree upon the design I will update the docs.

Comment thread toml-spec/spec/spec.yaml Resolved
Comment thread toml-spec/spec/spec.yaml Resolved
@michaeladler
michaeladler force-pushed the feat/border-window-rule branch 2 times, most recently from 64c0710 to d21bdac Compare August 6, 2026 08:29
@michaeladler

Copy link
Copy Markdown
Contributor Author
  • Switched back to action-based window rule + applicable to Theme
  • Rebased

Comment thread src/theme.rs Resolved
@mahkoh

mahkoh commented Aug 7, 2026

Copy link
Copy Markdown
Owner

This looks pretty good!

@michaeladler
michaeladler force-pushed the feat/border-window-rule branch from d21bdac to bc2c08e Compare August 7, 2026 14:12
@michaeladler

michaeladler commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Successfully tested latest version

@michaeladler
michaeladler force-pushed the feat/border-window-rule branch from bc2c08e to ebc35e8 Compare August 8, 2026 09:23
@mahkoh
mahkoh force-pushed the feat/border-window-rule branch from ebc35e8 to 6dfdd9b Compare August 17, 2026 11:58
Comment thread src/theme.rs Resolved
Comment thread src/tree/toplevel.rs Resolved
@michaeladler
michaeladler force-pushed the feat/border-window-rule branch from 6dfdd9b to ae40920 Compare August 18, 2026 06:00
@mahkoh
mahkoh force-pushed the feat/border-window-rule branch from ae40920 to 41457b0 Compare August 23, 2026 11:57
Comment thread src/tree/toplevel.rs Resolved
@michaeladler
michaeladler force-pushed the feat/border-window-rule branch from 41457b0 to 8d6144f Compare August 23, 2026 19:10
@mahkoh
mahkoh force-pushed the feat/border-window-rule branch from 8d6144f to 82e8bff Compare August 30, 2026 14:57
Theme properties can now be overridden per window via window rules, e.g.:

```toml
[[windows]]
match.app-id = "mpv"
action = { type = "set-window-theme", theme.border-width = 0 }
```

If several rules override the same property of a window, the rule that
appears last takes precedence.
@mahkoh
mahkoh force-pushed the feat/border-window-rule branch from 82e8bff to 8721103 Compare August 31, 2026 12:16
@mahkoh

mahkoh commented Sep 16, 2026

Copy link
Copy Markdown
Owner

This required tons of refactorings to fully implement it. The final result is now in #1263. Please test it.

@mahkoh mahkoh closed this Sep 16, 2026
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.

2 participants