IBus: Difference between revisions
Improve wiki page structure and old templates. |
m →Installation: Format code block (using nixfmt-rfc-style) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
Enabling IBus is described in the [https://nixos.org/nixos/manual/index.html#module-services-input-methods-ibus manual]. To enable it is as follows: | Enabling IBus is described in the [https://nixos.org/nixos/manual/index.html#module-services-input-methods-ibus manual]. To enable it is as follows: | ||
{{file|3={pkgs, lib, ...}: | {{file|3={ pkgs, lib, ... }: | ||
{ | { | ||
i18n.inputMethod = { | |||
enable = true; | |||
type = "ibus"; | |||
ibus.engines = with pkgs.ibus-engines; [ | |||
# Your engines here | |||
]; | |||
}; | |||
}|name=/etc/nixos/configuration.nix|lang=nix}}Available engines are listed under the <code>pkgs.ibus-engines</code> attribute set. The list of available engines can be viewed in the documentation for the {{nixos:option|i18n.inputMethod.ibus.engines}}option. | }|name=/etc/nixos/configuration.nix|lang=nix}}Available engines are listed under the <code>pkgs.ibus-engines</code> attribute set. The list of available engines can be viewed in the documentation for the {{nixos:option|i18n.inputMethod.ibus.engines}}option. | ||
| Line 20: | Line 20: | ||
=== Custom emojis === | === Custom emojis === | ||
Custom emojis can be added to the emoji selection dialog of IBus. This can be used to workaround the fact that GTK does not support compose rules which output more than one unicode codepoint. Here an example [[Home Manager]] | Custom emojis can be added to the emoji selection dialog of IBus. This can be used to workaround the fact that GTK does not support compose rules which output more than one unicode codepoint. Here an example [[Home Manager]] snippet. | ||
{{file| | {{file|3={ pkgs, lib, config, ... }: | ||
{ pkgs, lib, config, ... }: | |||
let | let | ||
/* define here the list of desired favorite emoji */ | /* define here the list of desired favorite emoji */ | ||
| Line 36: | Line 35: | ||
favorites = mkArray type.string (lib.attrValues fav); | favorites = mkArray type.string (lib.attrValues fav); | ||
}; | }; | ||
} | }|name=~/.config/home-manager/home.nix|lang=nix}} | ||
Then, | Then, pressing <code>Ctrl+Shift+e</code> and then typing <code>shrug</code>, then hitting <code>Space</code> and <code>Return</code> will insert <code>¯\_(ツ)_/¯</code>. | ||
== See also == | == See also == | ||