aboutsummaryrefslogtreecommitdiff
path: root/wiki
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-01-23 10:40:52 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-01-23 11:13:55 +0300
commita10705fb200b452802a1ba7cd47679536e0ef849 (patch)
tree7e12f0602c4652e043021392632e7e4e24ebb4fe /wiki
parentb01b8afa8c8f9070300243050d9790e38fd19145 (diff)
downloadniri-a10705fb200b452802a1ba7cd47679536e0ef849.tar.gz
niri-a10705fb200b452802a1ba7cd47679536e0ef849.tar.bz2
niri-a10705fb200b452802a1ba7cd47679536e0ef849.zip
Add toggle-window-rule-opacity action
Diffstat (limited to 'wiki')
-rw-r--r--wiki/Configuration:-Key-Bindings.md11
-rw-r--r--wiki/Configuration:-Window-Rules.md2
2 files changed, 13 insertions, 0 deletions
diff --git a/wiki/Configuration:-Key-Bindings.md b/wiki/Configuration:-Key-Bindings.md
index 5893d61e..2331f8a9 100644
--- a/wiki/Configuration:-Key-Bindings.md
+++ b/wiki/Configuration:-Key-Bindings.md
@@ -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; }
+}
+```
diff --git a/wiki/Configuration:-Window-Rules.md b/wiki/Configuration:-Window-Rules.md
index d3fb9068..cd0a65b2 100644
--- a/wiki/Configuration:-Window-Rules.md
+++ b/wiki/Configuration:-Window-Rules.md
@@ -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).