this post was submitted on 16 Jan 2026
1 points (100.0% liked)

Niri WM

61 readers
2 users here now

About this Niri community

Community for Niri, a scrolling window manager (compositor) for wayland.

Niri's GitHub: https://github.com/YaLTeR/niri Niri's docs: https://yalter.github.io/niri/

Post your setups, configs, tools, tips and tricks, or just anything related to Niri.

This community is not affiliated with Niri, nor with it's creator YaLTeR.

Rules

Help requests

Help requests are allowed (for now), but consider opening a GitHub issue instead. Basically:

General

Not any specific rules yet. Be decent, respect instance-wide lemmy rules. This is the internet - I don't need to prove you broke a written rule to ban you :)

founded 5 months ago
MODERATORS
 

Niri doesn't have a command to change its settings yet. However, as its config files are live reloaded, you can write to them programmatically and it will update immediately. Here's my script to toggle the swapescape keyboard functionality that swaps Escape and CapsLock:

#!/bin/bash

if [ $(
	grep -c ",caps:swapescape" ~/.config/niri/config.kdl
) -eq 1 ]; then
	sed -i s/",caps:swapescape//" ~/.config/niri/config.kdl
else
	sed -i "s/options \"grp:win_space_toggle/&,caps:swapescape/" ~/.config/niri/config.kdl
fi

I bind the script to a keyboard shortcut in niri config:

Mod+Shift+A { spawn "bash" "-c" "~/scripts/toggle_caps_esc_swap.sh"; }

I like to have the keys swapped, but some games act weirdly with it and use the actual Esc key, which also enables CapsLock in addition to showing some in-game menu. This way, I can quickly disable the swap when launching the game, and enable it after I'm done.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here