From 1e266dac0d98368c8f253341fb175f1b65f402e3 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Fri, 20 Jan 2017 18:50:52 -0600 Subject: ibus: make panel configurable --- nixos/modules/i18n/input-method/ibus.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'nixos/modules/i18n/input-method') diff --git a/nixos/modules/i18n/input-method/ibus.nix b/nixos/modules/i18n/input-method/ibus.nix index e23e28aa25e..3eaf9e2ab37 100644 --- a/nixos/modules/i18n/input-method/ibus.nix +++ b/nixos/modules/i18n/input-method/ibus.nix @@ -10,6 +10,11 @@ let check = x: (lib.types.package.check x) && (attrByPath ["meta" "isIbusEngine"] false x); }; + impanel = + if cfg.panel != null + then "--panel=${cfg.panel}" + else ""; + ibusAutostart = pkgs.writeTextFile { name = "autostart-ibus-daemon"; destination = "/etc/xdg/autostart/ibus-daemon.desktop"; @@ -17,7 +22,7 @@ let [Desktop Entry] Name=IBus Type=Application - Exec=${ibusPackage}/bin/ibus-daemon --daemonize --xim + Exec=${ibusPackage}/bin/ibus-daemon --daemonize --xim ${impanel} ''; }; in @@ -36,6 +41,12 @@ in in "Enabled IBus engines. Available engines are: ${engines}."; }; + panel = mkOption { + type = with types; nullOr path; + default = null; + example = literalExample "${pkgs.kde5.plasma-desktop}/lib/libexec/kimpanel-ibus-panel"; + description = "Replace the IBus panel with another panel."; + }; }; }; -- cgit 1.4.1