home-manager/tests/modules/misc/gtk/gtk3-basic-settings.nix
polykernel e01facc340
gtk: add cursor theme configuration (#2481)
* gtk: add cursor theme configuration

- Added the `cursorTheme` under the gtk module.
- Added tests for the gtk3 settings file generation, and renamed
  the gtk2 unit test expected file for clarity.
- Added guard against generating a blank `gtk.css` when `cfg.extraCss`
  is empty.
- Replaced `concatMapStrings` calls with `concatStringsSep`. The library function
  `concatMapStrings` generates an intemediate list which is then passed to
  `concatStringsSep`, As we are not performing other transformation except
  the addition of newlines, a direct call to `concatStringsSep` is sufficient.
- Updated description of examples to be more general "~/.config" -> "$XDG_CONFIG_HOME".
- Update helper functions `toGtk3Ini` and `formatGtk2Option` to use the library
  function `boolToString` and escape the separator in the key name.

* xcursor: delegate GTK cursor settings to gtk.cursorTheme

- Added deprecation warning for GTK settings in the `xsession.cursorTheme` module.
- Modified config section to use `gtk.cursorTheme` for GTK cursor settings.
2022-03-17 15:30:48 -04:00

24 lines
430 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
gtk = {
enable = true;
gtk3.extraConfig = {
gtk-cursor-blink = false;
gtk-recent-files-limit = 20;
};
};
test.stubs.dconf = { };
nmt.script = ''
assertPathExists home-files/.config/gtk-3.0
assertFileContent home-files/.config/gtk-3.0/settings.ini \
${./gtk3-basic-settings-expected.ini}
'';
};
}