mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
Use native floats for mouse scaling
This commit is contained in:
parent
f454cff5fe
commit
9acb5b1adc
1 changed files with 3 additions and 10 deletions
|
@ -3,15 +3,7 @@
|
|||
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;
|
||||
};
|
||||
|
||||
inherit (config.lib.defaults.types) floatWithDeprecationError;
|
||||
in {
|
||||
options = {
|
||||
|
||||
|
@ -28,8 +20,9 @@ in {
|
|||
|
||||
system.defaults.".GlobalPreferences"."com.apple.mouse.scaling" =
|
||||
mkOption {
|
||||
type = types.nullOr float;
|
||||
type = types.nullOr floatWithDeprecationError;
|
||||
default = null;
|
||||
example = -1;
|
||||
description = lib.mdDoc ''
|
||||
Sets the mouse tracking speed. Found in the "Mouse" section of
|
||||
"System Preferences". Set to -1 to disable mouse acceleration.
|
||||
|
|
Loading…
Add table
Reference in a new issue