mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Disable laptop panel when the lid is closed
This commit is contained in:
@@ -22,6 +22,7 @@ debug {
|
||||
emulate-zero-presentation-time
|
||||
disable-resize-throttling
|
||||
disable-transactions
|
||||
keep-laptop-panel-on-when-lid-is-closed
|
||||
}
|
||||
|
||||
binds {
|
||||
@@ -165,6 +166,19 @@ debug {
|
||||
}
|
||||
```
|
||||
|
||||
### `keep-laptop-panel-on-when-lid-is-closed`
|
||||
|
||||
<sup>Since: 0.1.10</sup>
|
||||
|
||||
By default, niri will disable the internal laptop monitor when the laptop lid is closed.
|
||||
This flag turns off this behavior and will leave the internal laptop monitor on.
|
||||
|
||||
```kdl
|
||||
debug {
|
||||
keep-laptop-panel-on-when-lid-is-closed
|
||||
}
|
||||
```
|
||||
|
||||
### Key Bindings
|
||||
|
||||
These are not debug options, but rather key bindings.
|
||||
|
||||
@@ -8,8 +8,8 @@ Here are all the events that you can bind at a glance:
|
||||
|
||||
```kdl
|
||||
switch-events {
|
||||
lid-close { spawn "bash" "-c" "niri msg output \"eDP-1\" off"; }
|
||||
lid-open { spawn "bash" "-c" "niri msg output \"eDP-1\" on"; }
|
||||
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"; }
|
||||
}
|
||||
@@ -25,12 +25,12 @@ Currently, only the `spawn` action are supported.
|
||||
|
||||
These events correspond to closing and opening of the laptop lid.
|
||||
|
||||
You could use them to turn the laptop internal monitor off and on (until niri gets this functionality built-in).
|
||||
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 "bash" "-c" "niri msg output \"eDP-1\" off"; }
|
||||
lid-open { spawn "bash" "-c" "niri msg output \"eDP-1\" on"; }
|
||||
lid-close { spawn "notify-send" "The laptop lid is closed!"; }
|
||||
lid-open { spawn "notify-send" "The laptop lid is open!"; }
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user