From 3d3bbdfe955383033fd17c28d2b1e93d48515d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Reynier?= Date: Mon, 15 Aug 2022 19:19:16 +0200 Subject: [PATCH] clipmenu: add launcher option This adds an option to set the launcher command for Clipmenu (which is set with the `CM_LAUNCHER` session variable). --- modules/services/clipmenu.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/services/clipmenu.nix b/modules/services/clipmenu.nix index 3f2055c9a..4bb8916f1 100644 --- a/modules/services/clipmenu.nix +++ b/modules/services/clipmenu.nix @@ -18,6 +18,16 @@ in { defaultText = "pkgs.clipmenu"; description = "clipmenu derivation to use."; }; + + launcher = mkOption { + type = types.nullOr types.str; + default = null; + example = "rofi"; + description = '' + Launcher command, if not set, dmenu + will be used by default. + ''; + }; }; config = mkIf cfg.enable { @@ -28,6 +38,9 @@ in { home.packages = [ cfg.package ]; + home.sessionVariables = + mkIf (cfg.launcher != null) { CM_LAUNCHER = cfg.launcher; }; + systemd.user.services.clipmenu = { Unit = { Description = "Clipboard management daemon";