[PR #12092] Add adjustOpacity action #28840

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

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

State: closed
Merged: Yes


Adds an action which can be used to change the opacity at runtime. This is a follow up to some of the other work I had been doing around opacity and settings previewing at the end of the year.

edit: pseudo-spec

  • adjustOpacity:
    • "opacity": (required) an integer number to set the opacity to.
    • "relative": (defaults to true)
      • If false, set the opacity to the given value, which should be between [0, 100].
      • If true, then use opacity as a relative adjustment to the current opacity. So the implementation would get the current opacity for this pane, then add this action's opacity to that value. Should be between [-100, 100]

This would allow both setting exactly 25% opacity with an action, and binding an action that increases/decreases the opacity one {amount}

It's preview-able too, which is neat.

adjust-opacity-preview-001

**Original Pull Request:** https://github.com/microsoft/terminal/pull/12092 **State:** closed **Merged:** Yes --- Adds an action which can be used to change the opacity at runtime. This is a follow up to some of the other work I had been doing around opacity and settings previewing at the end of the year. > edit: pseudo-spec > > * `adjustOpacity`: > * `"opacity"`: (**required**) an integer number to set the opacity to. > * `"relative"`: (defaults to `true`) > * If false, set the opacity to the given value, which should be between [0, 100]. > * If true, then use `opacity` as a relative adjustment to the current opacity. So the implementation would get the current opacity for this pane, then add this action's opacity to that value. Should be between [-100, 100] > > This would allow both setting exactly 25% opacity with an action, and binding an action that increases/decreases the opacity one {amount} It's preview-able too, which is neat. ![adjust-opacity-preview-001](https://user-images.githubusercontent.com/18356694/140785805-5eecf6ec-0933-40e4-bcba-41b88d25b6a8.gif) * [x] Closes #11205 * [x] I work here * [x] Docs updated: https://github.com/MicrosoftDocs/terminal/pull/477
claunia added the pull-request label 2026-01-31 09:31:07 +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#28840