mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
gtk: add color scheme option
This commit is contained in:
parent
ea3fe2bd72
commit
f35703b412
10 changed files with 87 additions and 1 deletions
|
|
@ -3,6 +3,9 @@
|
|||
gtk-per-version-override = ./gtk-per-version-override.nix;
|
||||
gtk-selective-enable = ./gtk-selective-enable.nix;
|
||||
|
||||
# ColorScheme tests
|
||||
gtk-colorscheme = ./gtk-colorscheme.nix;
|
||||
|
||||
# GTK2
|
||||
gtk2-basic-config = ./gtk2/gtk2-basic-config.nix;
|
||||
gtk2-config-file-location = ./gtk2/gtk2-config-file-location.nix;
|
||||
|
|
|
|||
30
tests/modules/misc/gtk/gtk-colorscheme.nix
Normal file
30
tests/modules/misc/gtk/gtk-colorscheme.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme.name = "Adwaita";
|
||||
iconTheme.name = "Adwaita";
|
||||
|
||||
# Global dark colorScheme
|
||||
colorScheme = "dark";
|
||||
|
||||
# GTK3 overrides to light
|
||||
gtk3.colorScheme = "light";
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
# GTK3's settings should be untouched
|
||||
assertFileExists home-files/.config/gtk-3.0/settings.ini
|
||||
assertFileNotRegex home-files/.config/gtk-3.0/settings.ini \
|
||||
'gtk-application-prefer-dark-theme'
|
||||
|
||||
# GTK4 should inherit global dark colorScheme
|
||||
assertFileExists home-files/.config/gtk-4.0/settings.ini
|
||||
assertFileContains home-files/.config/gtk-4.0/settings.ini \
|
||||
'gtk-application-prefer-dark-theme=true'
|
||||
assertFileContains home-files/.config/gtk-4.0/settings.ini \
|
||||
'gtk-interface-color-scheme=2'
|
||||
|
||||
echo "ColorScheme test completed successfully"
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
[Settings]
|
||||
gtk-application-prefer-dark-theme=true
|
||||
gtk-cursor-theme-name=Adwaita
|
||||
gtk-cursor-theme-size=24
|
||||
gtk-font-name=Ubuntu 12
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
[Settings]
|
||||
gtk-application-prefer-dark-theme=true
|
||||
gtk-cursor-theme-name=Adwaita
|
||||
gtk-cursor-theme-size=24
|
||||
gtk-font-name=Ubuntu 12
|
||||
gtk-icon-theme-name=Adwaita
|
||||
gtk-interface-color-scheme=2
|
||||
gtk-theme-name=Adwaita-dark
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
name = "Adwaita";
|
||||
size = 24;
|
||||
};
|
||||
colorScheme = "dark";
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue