Add toggle-window-rule-opacity action

This commit is contained in:
Ivan Molodetskikh
2025-01-23 10:40:52 +03:00
parent b01b8afa8c
commit a10705fb20
13 changed files with 115 additions and 2 deletions
+11
View File
@@ -253,3 +253,14 @@ Or, in scripts:
```shell
niri msg action do-screen-transition --delay-ms 100
```
#### `toggle-window-rule-opacity`
Toggle the opacity window rule of the focused window.
This only has an effect if the window's opacity window rule is already set to semitransparent.
```kdl
binds {
Mod+O { toggle-window-rule-opacity; }
}
```
+2
View File
@@ -492,6 +492,8 @@ This is applied on top of the window's own opacity, so semitransparent windows w
Opacity is applied to every surface of the window individually, so subsurfaces and pop-up menus will show window content behind them.
Opacity can be toggled on or off for a window using the [`toggle-window-rule-opacity`](./Configuration:-Key-Bindings.md) action.
![Screenshot showing Adwaita Demo with a semitransparent pop-up menu.](./img/opacity-popup.png)
Also, focus ring and border with background will show through semitransparent windows (see `prefer-no-csd` and the `draw-border-with-background` window rule below).