From 6c407989348618d0349400e25fd9b1c47058fda2 Mon Sep 17 00:00:00 2001 From: Mike Hume Date: Wed, 29 Nov 2023 21:13:20 -1000 Subject: [PATCH 1/2] Adding reduce motion option --- modules/system/defaults/universalaccess.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/system/defaults/universalaccess.nix b/modules/system/defaults/universalaccess.nix index 51a1fb7c..8d012e6f 100644 --- a/modules/system/defaults/universalaccess.nix +++ b/modules/system/defaults/universalaccess.nix @@ -15,6 +15,14 @@ with lib; ''; }; + system.defaults.universalaccess.reduceMotion = mkOption { + type = types.nullOr types.bool; + default = null; + description = lib.mdDoc '' + Disable animation when switching screens or opening apps + ''; + }; + system.defaults.universalaccess.reduceTransparency = mkOption { type = types.nullOr types.bool; default = null; From 4a4542ba8963f8be02c3b7aeab9197d04b070fd0 Mon Sep 17 00:00:00 2001 From: Mike Hume Date: Tue, 2 Jan 2024 22:58:18 -1000 Subject: [PATCH 2/2] Adding test --- tests/system-defaults-write.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/system-defaults-write.nix b/tests/system-defaults-write.nix index dc4752eb..e3f69fec 100644 --- a/tests/system-defaults-write.nix +++ b/tests/system-defaults-write.nix @@ -51,6 +51,7 @@ system.defaults.smb.NetBIOSName = "IMAC-000000"; system.defaults.smb.ServerDescription = ''Darwin\\\\U2019s iMac''; system.defaults.universalaccess.mouseDriverCursorSize = 1.5; + system.defaults.universalaccess.reduceMotion = true; system.defaults.universalaccess.reduceTransparency = true; system.defaults.universalaccess.closeViewScrollWheelToggle = true; system.defaults.universalaccess.closeViewZoomFollowsFocus = true; @@ -120,6 +121,7 @@ grep "defaults write com.apple.screensaver 'askForPassword' -bool YES" ${config.out}/activate-user grep "defaults write com.apple.screensaver 'askForPasswordDelay' -int 5" ${config.out}/activate-user grep "defaults write com.apple.universalaccess 'mouseDriverCursorSize' -float 1.5" ${config.out}/activate-user + grep "defaults write com.apple.universalaccess 'reduceMotion' -bool YES" ${config.out}/activate-user grep "defaults write com.apple.universalaccess 'reduceTransparency' -bool YES" ${config.out}/activate-user grep "defaults write com.apple.universalaccess 'closeViewScrollWheelToggle' -bool YES" ${config.out}/activate-user grep "defaults write com.apple.universalaccess 'closeViewZoomFollowsFocus' -bool YES" ${config.out}/activate-user