r/niri • • 2d ago

Toggle gaps keybind?

Is there a clean way to make a keybind that toggels gaps in niri? I have relatively large gaps on for the looks, but sometimes it would be nice to not have.

1 Upvotes

3 comments sorted by

4

u/happahopp 2d ago

put the gap in a separate config file and make two of them. then bind a key to a script that switches them.

or a sed command that modifies the config file.

4

u/DullNetwork761 2d ago

You don't need a full config either. Just a separate config with just the gaps line. gapson.kdl and gapsoff.kdl. then use the sed command in a script to toggle which file is included in config.kdl

1

u/venserven 2d ago

This is what I do just with a helper script so I can pass the name of a file to add or remove from imports.