nix-config/modules/niri/xwl-wrapper.nix
2025-02-28 19:32:44 +01:00

20 lines
394 B
Nix

{
pkgs,
name,
pkg ? name,
exe ? pkg,
...
}: let
inherit (pkgs.lib) concatStrings;
config = pkgs.writeTextFile {
name = concatStrings ["i3-config" name];
text = ''
exec ${pkgs.${pkg}}/bin/${exe}
'';
};
in
pkgs.makeDesktopItem {
name = name;
desktopName = name;
exec = "${pkgs.xwayland-run}/bin/xwayland-run -- ${pkgs.i3}/bin/i3 -c ${config}";
}