Launch graphical programs using `kanata`

Is it possible to launch gui programs using the kanata module? I’m trying to create a layer with keys to launch several terminals, but the root user is running them and they can’t access the current user’s DISPLAY variable.

If this is not possible with kanata, what other options are available? Would keyd work, for example?

Normally this is done by the window manager. Which one are you using?

At the moment, gnome, but I’d like a somewhat window-manager-agnostic way of doing this, if possible.

Looks good, but is there anything else already packaged for NixOS?

Sorry if I’m being dumb, but I can’t tell whether you think keymapper isn’t packaged for NixOS (it is) or if you know that but want something else anyway.

Sorry, sorry, wrong term; I meant modularized. I don’t think I can implement the necessary security features myself if I have to do it.

1 Like

Ah yes, that makes sense. It has a helpful community on github, but yeah, it’s complicated to work with.

1 Like

Because I tried to do the same thing with swhkd, and I couldn’t get sudo, pkexec, etc. to work either. Same with sudo and kanata, actually. swhkd has a NixOS module in the works, apparently, but development seems to have stagnated a tad, I think…?