From a10705fb200b452802a1ba7cd47679536e0ef849 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Thu, 23 Jan 2025 10:40:52 +0300 Subject: Add toggle-window-rule-opacity action --- wiki/Configuration:-Key-Bindings.md | 11 +++++++++++ wiki/Configuration:-Window-Rules.md | 2 ++ 2 files changed, 13 insertions(+) (limited to 'wiki') 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). -- cgit