nix-config/modules/niri/xwl-wrapper.nix
2024-10-15 17:04:44 +02:00

13 lines
377 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}";
}