diff options
| author | Kent Daleng <lolexplode@gmail.com> | 2025-08-17 16:05:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-17 17:05:41 +0300 |
| commit | dc93f1c1fd7b67e2da5af2ffada732b9ddeb2d6a (patch) | |
| tree | a2f2938a7df17c196be7016dc5fe1fc9f75fb484 /wiki/Configuration:-Switch-Events.md | |
| parent | a6febb86aa5af0df7bf2792ca027ef95a503d599 (diff) | |
| download | niri-dc93f1c1fd7b67e2da5af2ffada732b9ddeb2d6a.tar.gz niri-dc93f1c1fd7b67e2da5af2ffada732b9ddeb2d6a.tar.bz2 niri-dc93f1c1fd7b67e2da5af2ffada732b9ddeb2d6a.zip | |
github wiki replacement / mkdocs-docs (#2147)
* Add wiki based on mkdocs
* wording fixes
* fix github bg color on narrow
* Fix left sidebar section headers being bigger than pages
* fix hover accent
* fix list rendering on fractional layout
* fix videos
* fix automatic full links
* remove redundant commented css
* improve dark mode contrast
* update pygments for better child node coloring
* update logo
* remove blank lines
* add systemd language hint
---------
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
Diffstat (limited to 'wiki/Configuration:-Switch-Events.md')
| -rw-r--r-- | wiki/Configuration:-Switch-Events.md | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/wiki/Configuration:-Switch-Events.md b/wiki/Configuration:-Switch-Events.md deleted file mode 100644 index c3d2907b..00000000 --- a/wiki/Configuration:-Switch-Events.md +++ /dev/null @@ -1,47 +0,0 @@ -### Overview - -<sup>Since: 0.1.10</sup> - -Switch event bindings are declared in the `switch-events {}` section of the config. - -Here are all the events that you can bind at a glance: - -```kdl -switch-events { - lid-close { spawn "notify-send" "The laptop lid is closed!"; } - lid-open { spawn "notify-send" "The laptop lid is open!"; } - tablet-mode-on { spawn "bash" "-c" "gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true"; } - tablet-mode-off { spawn "bash" "-c" "gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false"; } -} -``` - -The syntax is similar to key bindings. -Currently, only the [`spawn` action](./Configuration:-Key-Bindings.md#spawn) are supported. - -> [!NOTE] -> In contrast to key bindings, switch event bindings are *always* executed, even when the session is locked. - -### `lid-close`, `lid-open` - -These events correspond to closing and opening of the laptop lid. - -Note that niri will already automatically turn the internal laptop monitor on and off in accordance with the laptop lid. - -```kdl -switch-events { - lid-close { spawn "notify-send" "The laptop lid is closed!"; } - lid-open { spawn "notify-send" "The laptop lid is open!"; } -} -``` - -### `tablet-mode-on`, `tablet-mode-off` - -These events trigger when a convertible laptop goes into or out of tablet mode. -In tablet mode, the keyboard and mouse are usually inaccessible, so you can use these events to activate the on-screen keyboard. - -```kdl -switch-events { - tablet-mode-on { spawn "bash" "-c" "gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true"; } - tablet-mode-off { spawn "bash" "-c" "gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false"; } -} -``` |
