1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

lightdm-gtk-greater: add configuration options for clock format and indicators

This commit is contained in:
José Romildo Malaquias 2017-12-24 11:21:18 -02:00 committed by Orivej Desh
parent 1658da7e5b
commit d0eb40b311
2 changed files with 76 additions and 0 deletions

View file

@ -189,6 +189,51 @@ following incompatible changes:</para>
corrupted blocks.
</para>
</listitem>
<listitem>
<para>
<literal>displayManager.lightdm.greeters.gtk.clock-format.</literal>
has been added, the clock format string (as expected by
strftime, e.g. <literal>%H:%M</literal>) to use with the lightdm
gtk greeter panel.
</para>
<para>
If set to null the default clock format is used.
</para>
</listitem>
<listitem>
<para>
<literal>displayManager.lightdm.greeters.gtk.indicators</literal>
has been added, a list of allowed indicator modules to use with
the lightdm gtk greeter panel.
</para>
<para>
Built-in indicators include <literal>~a11y</literal>,
<literal>~language</literal>, <literal>~session</literal>,
<literal>~power</literal>, <literal>~clock</literal>,
<literal>~host</literal>, <literal>~spacer</literal>. Unity
indicators can be represented by short name
(e.g. <literal>sound</literal>, <literal>power</literal>),
service file name, or absolute path.
</para>
<para>
If set to <literal>null</literal> the default indicators are
used.
</para>
<para>
In order to have the previous default configuration add
<programlisting>
services.xserver.displayManager.lightdm.greeters.gtk.indicators = [
"~host" "~spacer"
"~clock" "~spacer"
"~session"
"~language"
"~a11y"
"~power"
];
</programlisting>
to your <literal>configuration.nix</literal>.
</para>
</listitem>
</itemizedlist>
</section>

View file

@ -45,6 +45,8 @@ let
theme-name = ${cfg.theme.name}
icon-theme-name = ${cfg.iconTheme.name}
background = ${ldmcfg.background}
${optionalString (cfg.clock-format != null) "clock-format = ${cfg.clock-format}"}
${optionalString (cfg.indicators != null) "indicators = ${concatStringsSep ";" cfg.indicators}"}
${cfg.extraConfig}
'';
@ -104,6 +106,35 @@ in
};
clock-format = mkOption {
type = types.nullOr types.str;
default = null;
example = "%F";
description = ''
Clock format string (as expected by strftime, e.g. "%H:%M")
to use with the lightdm gtk greeter panel.
If set to null the default clock format is used.
'';
};
indicators = mkOption {
type = types.nullOr (types.listOf types.str);
default = null;
example = [ "~host" "~spacer" "~clock" "~spacer" "~session" "~language" "~a11y" "~power" ];
description = ''
List of allowed indicator modules to use for the lightdm gtk
greeter panel.
Built-in indicators include "~a11y", "~language", "~session",
"~power", "~clock", "~host", "~spacer". Unity indicators can be
represented by short name (e.g. "sound", "power"), service file name,
or absolute path.
If set to null the default indicators are used.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";