clipmenu: add launcher option

This adds an option to set the launcher command for Clipmenu
(which is set with the `CM_LAUNCHER` session variable).
This commit is contained in:
Loïc Reynier 2022-08-15 19:19:16 +02:00 committed by Robert Helgesson
parent 4c8c1c9977
commit 3d3bbdfe95
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -18,6 +18,16 @@ in {
defaultText = "pkgs.clipmenu"; defaultText = "pkgs.clipmenu";
description = "clipmenu derivation to use."; description = "clipmenu derivation to use.";
}; };
launcher = mkOption {
type = types.nullOr types.str;
default = null;
example = "rofi";
description = ''
Launcher command, if not set, <command>dmenu</command>
will be used by default.
'';
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -28,6 +38,9 @@ in {
home.packages = [ cfg.package ]; home.packages = [ cfg.package ];
home.sessionVariables =
mkIf (cfg.launcher != null) { CM_LAUNCHER = cfg.launcher; };
systemd.user.services.clipmenu = { systemd.user.services.clipmenu = {
Unit = { Unit = {
Description = "Clipboard management daemon"; Description = "Clipboard management daemon";