Unverified Commit a43b1443 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

USWM: Add option to pass args to the compositor (#456748)

parents 1dbefdd9 eb4cb69e
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -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;
    };