USWM: Add option to pass args to the compositor
As this is not possible with the binPath https://github.com/Vladimir-csp/uwsm?tab=readme-ov-file#syntax-and-behavior
This commit is contained in:
@@ -16,7 +16,7 @@ let
|
||||
[Desktop Entry]
|
||||
Name=${opts.prettyName} (UWSM)
|
||||
Comment=${opts.comment}
|
||||
Exec=${lib.getExe cfg.package} start -F ${opts.binPath}
|
||||
Exec=${lib.getExe cfg.package} start -F -- ${opts.binPath} ${lib.strings.escapeShellArgs opts.extraArgs}
|
||||
Type=Application
|
||||
'';
|
||||
destination = "/share/wayland-sessions/${opts.name}-uwsm.desktop";
|
||||
@@ -84,6 +84,13 @@ in
|
||||
'';
|
||||
example = "/run/current-system/sw/bin/ExampleCompositor";
|
||||
};
|
||||
extraArgs = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Extra command-line arguments pass to to the compsitor.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
@@ -117,7 +124,12 @@ in
|
||||
name: value:
|
||||
mk_uwsm_desktop_entry {
|
||||
inherit name;
|
||||
inherit (value) prettyName comment binPath;
|
||||
inherit (value)
|
||||
prettyName
|
||||
comment
|
||||
binPath
|
||||
extraArgs
|
||||
;
|
||||
}
|
||||
) cfg.waylandCompositors;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user