Skip to content

Commit

Permalink
ibus: make panel configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
ttuegel committed Jan 21, 2017
1 parent c7d49e5 commit 1e266da
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion nixos/modules/i18n/input-method/ibus.nix
Expand Up @@ -10,14 +10,19 @@ 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";
text = ''
[Desktop Entry]
Name=IBus
Type=Application
Exec=${ibusPackage}/bin/ibus-daemon --daemonize --xim
Exec=${ibusPackage}/bin/ibus-daemon --daemonize --xim ${impanel}
'';
};
in
Expand All @@ -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.";
};
};
};

Expand Down

1 comment on commit 1e266da

@cstrahan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ttuegel You probably want to comment that ${ (e.g. ''${) so pkgs.kde5.plasma-desktop doesn't end up in the manual's dependency closure, right?

Please sign in to comment.