better xwl wrapper

This commit is contained in:
twoneis 2024-10-15 17:04:44 +02:00
parent d739e2cc35
commit 213db71582
3 changed files with 8 additions and 9 deletions

View file

@ -19,7 +19,7 @@ in mkIf conf.apps.enable {
inkscape
blender
gnome-disk-utility
] ++ [(mkXwlWrapper { lib = lib; pkgs = pkgs; app = "${pkgs.prusa-slicer}/bin/prusa-slicer"; name = "Prusa"; })];
] ++ [(mkXwlWrapper { pkgs = pkgs; name = "Prusa"; pkg = "prusa-slicer"; })];
home.file = {
".config/vesktop/settings.json" = {

View file

@ -10,15 +10,14 @@
'';
};
holo = pkgs.makeDesktopItem {
name = "holo";
desktopName = "Holo";
name = "Steam Big Picture";
desktopName = "Steam Big Picture";
exec = "${holo-script}/bin/holo-script";
};
steam-wrapped = mkXwlWrapper {
lib = lib;
pkgs = pkgs;
app = "${pkgs.steam}/bin/steam";
name = "Steam Wrapped";
pkg = "steam";
};
in mkIf conf.games.enable {
programs.steam.enable = true;

View file

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