[PR #15441] Add support for setting the window frame color #30636

Open
opened 2026-01-31 09:42:00 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/15441

State: closed
Merged: Yes


Summary of the Pull Request

Add support for $theme.window.frame, .unfocusedFrame, and .rainbowFrame. The first two accept a ThemeColor to set the window frame, using DwmSetWindowAttribute with DWMWA_BORDER_COLOR. rainbowFrame accepts a bool. When enabled, it'll cycle the color of the frame through all the hues, ala this gif (but, constantly, instead of just when the window moves).

This only works on Windows 11.

Validation Steps Performed

  • Works on Windows 11
  • Doesn't explode on Windows 10

PR Checklist

other details

There's probably some impact to perf with rainbowFrame. It's one DispatcherTimer per window. That could probably be optimized somehow to like, one per process, but meh?

some sample json for copypasta

{
    "name": "Accent Titlebar",
    "tab":
    {
        "background": "terminalBackground",
        "unfocusedBackground": "#00000000",
        "showCloseButton": "hover"
    },
    "tabRow":
    {
        "background": "accent"
    },
    "window":
    {
        "applicationTheme": "system",
        "frame": "accent",
        // "frame": "terminalBackground",
        "unfocusedFrame": "#ff0000",
        // "unfocusedFrame": null,
        "rainbowFrame": true
    }
},
**Original Pull Request:** https://github.com/microsoft/terminal/pull/15441 **State:** closed **Merged:** Yes --- <!-- Remember kids, it's always okay to punch nazis --> ## Summary of the Pull Request Add support for `$theme.window.frame`, `.unfocusedFrame`, and `.rainbowFrame`. The first two accept a `ThemeColor` to set the window frame, using [`DwmSetWindowAttribute`](https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute) with [`DWMWA_BORDER_COLOR`](https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute). `rainbowFrame` accepts a `bool`. When enabled, it'll cycle the color of the frame through all the hues, ala [this gif](https://user-images.githubusercontent.com/18356694/164307822-e4267965-2ce0-4294-8499-59c3ba7edbae.gif) (but, constantly, instead of just when the window moves). This only works on Windows 11. ## Validation Steps Performed * Works on Windows 11 * Doesn't explode on Windows 10 ## PR Checklist - [x] Closes #12950 - See also #3327 - [x] Schema updated (if necessary) ### other details There's probably some impact to perf with `rainbowFrame`. It's one `DispatcherTimer` per window. That could probably be optimized somehow to like, one per process, but meh? ### some sample json for copypasta ```json { "name": "Accent Titlebar", "tab": { "background": "terminalBackground", "unfocusedBackground": "#00000000", "showCloseButton": "hover" }, "tabRow": { "background": "accent" }, "window": { "applicationTheme": "system", "frame": "accent", // "frame": "terminalBackground", "unfocusedFrame": "#ff0000", // "unfocusedFrame": null, "rainbowFrame": true } }, ```
claunia added the pull-request label 2026-01-31 09:42:00 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30636