diff options
Diffstat (limited to 'doc/builders/packages/urxvt.xml')
-rw-r--r-- | doc/builders/packages/urxvt.xml | 50 |
1 files changed, 32 insertions, 18 deletions
diff --git a/doc/builders/packages/urxvt.xml b/doc/builders/packages/urxvt.xml index 135cc82a0b51..330e056b6560 100644 --- a/doc/builders/packages/urxvt.xml +++ b/doc/builders/packages/urxvt.xml @@ -18,10 +18,13 @@ includes all available plugins. To make use of this functionality, use an overlay or directly install an expression that overrides its configuration, such as - <programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: { +<programlisting> +rxvt-unicode.override { + configure = { availablePlugins, ... }: { plugins = with availablePlugins; [ perls resize-font vtwheel ]; - } -}</programlisting> + }; +} +</programlisting> If the <literal>configure</literal> function returns an attrset without the <literal>plugins</literal> attribute, <literal>availablePlugins</literal> will be used automatically. @@ -30,18 +33,22 @@ <para> In order to add plugins but also keep all default plugins installed, it is possible to use the following method: - <programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: { - plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ]; - }; -}</programlisting> +<programlisting> +rxvt-unicode.override { + configure = { availablePlugins, ... }: { + plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ]; + }; +} +</programlisting> </para> <para> To get a list of all the plugins available, open the Nix REPL and run - <programlisting>$ nix repl +<screen> +<prompt>$ </prompt>nix repl :l <nixpkgs> map (p: p.name) pkgs.rxvt-unicode.plugins - </programlisting> +</screen> Alternatively, if your shell is bash or zsh and have completion enabled, simply type <literal>nixpkgs.rxvt-unicode.plugins.<tab></literal>. </para> @@ -53,18 +60,24 @@ map (p: p.name) pkgs.rxvt-unicode.plugins <literal>extraDeps</literal> can be used, for example, to provide <literal>xsel</literal> (a clipboard manager) to the clipboard plugin, without installing it globally: - <programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: { - pluginsDeps = [ xsel ]; - } -}</programlisting> +<programlisting> +rxvt-unicode.override { + configure = { availablePlugins, ... }: { + pluginsDeps = [ xsel ]; + }; +} +</programlisting> <literal>perlDeps</literal> is a handy way to provide Perl packages to your custom plugins (in <literal>$HOME/.urxvt/ext</literal>). For example, if you need <literal>AnyEvent</literal> you can do: - <programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: { - perlDeps = with perlPackages; [ AnyEvent ]; - } -}</programlisting> +<programlisting> +rxvt-unicode.override { + configure = { availablePlugins, ... }: { + perlDeps = with perlPackages; [ AnyEvent ]; + }; +} +</programlisting> </para> </section> @@ -90,7 +103,8 @@ map (p: p.name) pkgs.rxvt-unicode.plugins <para> If the plugin is itself a perl package that needs to be imported from other plugins or scripts, add the following passthrough: - <programlisting>passthru.perlPackages = [ "self" ]; +<programlisting> +passthru.perlPackages = [ "self" ]; </programlisting> This will make the urxvt wrapper pick up the dependency and set up the perl path accordingly. |