ibus: make panel configurable

This commit is contained in:
Thomas Tuegel 2017-01-20 18:50:52 -06:00
parent c7d49e5f69
commit 1e266dac0d
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59

View File

@ -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.";
};
};
};