aboutsummaryrefslogtreecommitdiff
path: root/wiki
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-05-07 22:06:43 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-05-07 22:19:11 +0400
commit5248e534995dc21279cfd14651c994cd02353452 (patch)
treea08bd585caad1febbd5be1ba018841c4cb842993 /wiki
parent9847a652af864109b3543e42d48087a38c0729ad (diff)
downloadniri-5248e534995dc21279cfd14651c994cd02353452.tar.gz
niri-5248e534995dc21279cfd14651c994cd02353452.tar.bz2
niri-5248e534995dc21279cfd14651c994cd02353452.zip
Implement do-screen-transition action
Diffstat (limited to 'wiki')
-rw-r--r--wiki/Configuration:-Key-Bindings.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/wiki/Configuration:-Key-Bindings.md b/wiki/Configuration:-Key-Bindings.md
index 550ad620..c9e1b13b 100644
--- a/wiki/Configuration:-Key-Bindings.md
+++ b/wiki/Configuration:-Key-Bindings.md
@@ -186,3 +186,38 @@ binds {
Mod+Shift+E { quit skip-confirmation=true; }
}
```
+
+#### `do-screen-transition`
+
+Freeze the screen for a brief moment then crossfade to the new contents.
+
+```
+binds {
+ Mod+Return { do-screen-transition; }
+}
+```
+
+This action is mainly useful to trigger from scripts changing the system theme or style (between light and dark for example).
+It makes transitions like this, where windows change their style one by one, look smooth and synchronized.
+
+For example, using the GNOME color scheme setting:
+
+```shell
+niri msg action do-screen-transition
+dconf write /org/gnome/desktop/interface/color-scheme "\"prefer-dark\""
+```
+
+By default, the screen is frozen for 250 ms to give windows time to redraw, before the crossfade.
+You can set this delay like this:
+
+```
+binds {
+ Mod+Return { do-screen-transition delay-ms=100; }
+}
+```
+
+Or, in scripts:
+
+```shell
+niri msg action do-screen-transition --delay-ms 100
+```