diff options
| author | Domen Kožar <domen@dev.si> | 2022-12-16 13:07:17 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-16 13:07:17 +0000 |
| commit | adb8ac0453c8b2c40f5bffb578453dbaee838952 (patch) | |
| tree | c28502d47734cdd966472ebf9d887dc9f6cacaff /modules/system | |
| parent | 7e7498acfe3e20705f10dbf676cdd256bb8df03c (diff) | |
| parent | c82b2327e56f6ca41b8935c22c46853ac5926659 (diff) | |
Merge pull request #452 from psm14/mouse-scaling
add mouse scaling system setting
Diffstat (limited to 'modules/system')
| -rw-r--r-- | modules/system/defaults/GlobalPreferences.nix | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/modules/system/defaults/GlobalPreferences.nix b/modules/system/defaults/GlobalPreferences.nix index 935a8f2..5cce419 100644 --- a/modules/system/defaults/GlobalPreferences.nix +++ b/modules/system/defaults/GlobalPreferences.nix @@ -2,7 +2,17 @@ with lib; -{ +let + isFloat = x: isString x && builtins.match "^[+-]?([0-9]*[.])?[0-9]+$" x != null; + + float = mkOptionType { + name = "float"; + description = "float"; + check = isFloat; + merge = options.mergeOneOption; + }; + +in { options = { system.defaults.".GlobalPreferences"."com.apple.sound.beep.sound" = @@ -16,5 +26,14 @@ with lib; ''; }; + system.defaults.".GlobalPreferences"."com.apple.mouse.scaling" = + mkOption { + type = types.nullOr float; + default = null; + description = '' + Sets the mouse tracking speed. Found in the "Mouse" section of + "System Preferences". Set to -1 to disable mouse acceleration. + ''; + }; }; } |
