Skip to content

Commit

Permalink
Merge pull request #820 from mhumeSF/reduce-motion
Browse files Browse the repository at this point in the history
Add `universalaccess.reduceMotion` option
  • Loading branch information
Enzime authored Jan 3, 2024
2 parents 1a41453 + 4a4542b commit 0dd382b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/system/defaults/universalaccess.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions tests/system-defaults-write.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0dd382b

Please sign in to comment.