We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bca31e commit 4ebc38bCopy full SHA for 4ebc38b
1 file changed
src/content/docs/v5/compositor-settings/niri.mdx
@@ -220,3 +220,23 @@ layer-rule {
220
match namespace="^noctalia-desktop-widget-weather-"
221
}
222
```
223
+
224
+## Laptop
225
226
+To lock the screen when you close your laptop lid, add this to your Niri config file:
227
+``` kdl
228
+switch-events {
229
+ lid-close { spawn-sh "noctalia msg session lock-and-suspend"; }
230
+}
231
+```
232
233
+You may also need to edit your `logind.conf` to set:
234
235
+HandleLidSwitch=ignore
236
+HandleLidSwitchExternalPower=ignore
237
238
239
+:::note
240
+This file is usually located in `/etc/systemd/logind.conf` or `/etc/elogind/logind.conf` if you don't use systemd.
241
+If you can't find it, use this command: `find / -name "logind.conf" 2>/dev/null`.
242
+:::
0 commit comments