1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-06 16:57:03 +00:00

tests/home-cursor: init (#6496)

Working on module and needed test to verify expected behavior.
This commit is contained in:
Austin Horstman 2025-02-19 11:18:30 -08:00 committed by GitHub
parent 97ac0801d1
commit 1c189f0114
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 53 additions and 0 deletions

View file

@ -266,6 +266,7 @@ in import nmtSrc {
./modules/services/yubikey-agent-darwin
./modules/targets-darwin
] ++ lib.optionals isLinux [
./modules/config/home-cursor
./modules/config/i18n
./modules/i18n/input-method
./modules/misc/debug

View file

@ -0,0 +1,49 @@
{
# Ensure backwards compatibility with existing configs
home-cursor-legacy = { realPkgs, ... }: {
config = {
home.pointerCursor = {
package = realPkgs.catppuccin-cursors.macchiatoBlue;
name = "catppuccin-macchiato-blue-standard";
size = 64;
gtk.enable = true;
hyprcursor.enable = true;
x11.enable = true;
};
home.stateVersion = "24.11";
nmt.script = ''
assertFileContent \
home-path/share/icons/catppuccin-macchiato-blue-cursors/index.theme \
${./expected-index.theme}
hmEnvFile=home-path/etc/profile.d/hm-session-vars.sh
assertFileExists $hmEnvFile
assertFileRegex $hmEnvFile 'XCURSOR_THEME="catppuccin-macchiato-blue-standard"'
assertFileRegex $hmEnvFile 'XCURSOR_SIZE="64"'
assertFileRegex $hmEnvFile 'HYPRCURSOR_THEME="catppuccin-macchiato-blue-standard"'
assertFileRegex $hmEnvFile 'HYPRCURSOR_SIZE="64"'
'';
};
};
home-cursor-legacy-disabled = { ... }: {
config = {
home.pointerCursor = null;
home.stateVersion = "24.11";
nmt.script = ''
assertPathNotExists home-path/share/icons/catppuccin-macchiato-blue-cursors/index.theme
hmEnvFile=home-path/etc/profile.d/hm-session-vars.sh
assertFileExists $hmEnvFile
assertFileNotRegex $hmEnvFile 'XCURSOR_THEME="catppuccin-macchiato-blue-standard"'
assertFileNotRegex $hmEnvFile 'XCURSOR_SIZE="32"'
assertFileNotRegex $hmEnvFile 'HYPRCURSOR_THEME="catppuccin-macchiato-blue-standard"'
assertFileNotRegex $hmEnvFile 'HYPRCURSOR_SIZE="32"'
'';
};
};
}

View file

@ -0,0 +1,3 @@
[Icon Theme]
Name=Catppuccin Macchiato Blue
Comment=based on Volantes Cursors