home-manager/tests/modules/misc/gtk/gtk2-basic-config.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

25 lines
461 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
gtk = {
enable = true;
gtk2.extraConfig = "gtk-can-change-accels = 1";
};
test.stubs.dconf = { };
nmt.script = ''
assertFileExists home-files/.gtkrc-2.0
assertFileContent home-files/.gtkrc-2.0 \
${./gtk2-basic-config-expected.conf}
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
'GTK2_RC_FILES=.*/.gtkrc-2.0'
'';
};
}