Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inline prediction option mirroring the capitalization option #966

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/examples/lnl.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
system.defaults.NSGlobalDomain.InitialKeyRepeat = 10;
system.defaults.NSGlobalDomain.KeyRepeat = 1;
system.defaults.NSGlobalDomain.NSAutomaticCapitalizationEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticInlinePredictionEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticDashSubstitutionEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticPeriodSubstitutionEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticQuoteSubstitutionEnabled = false;
Expand Down
9 changes: 8 additions & 1 deletion modules/system/defaults/NSGlobalDomain.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ let
inherit (config.lib.defaults.types) floatWithDeprecationError;
in {
options = {

system.defaults.NSGlobalDomain.AppleShowAllFiles = mkOption {
type = types.nullOr types.bool;
default = null;
Expand Down Expand Up @@ -104,6 +103,14 @@ in {
'';
};

system.defaults.NSGlobalDomain.NSAutomaticInlinePredictionEnabled = mkOption {
type = types.nullOr types.bool;
default = null;
description = ''
Whether to enable inline predictive text. The default is true.
'';
};

system.defaults.NSGlobalDomain.NSAutomaticDashSubstitutionEnabled = mkOption {
type = types.nullOr types.bool;
default = null;
Expand Down
5 changes: 5 additions & 0 deletions tests/fixtures/system-defaults-write/activate-user.txt
emilazy marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ defaults write -g 'NSAutomaticDashSubstitutionEnabled' $'<?xml version="1.0" enc
<plist version="1.0">
<false/>
</plist>'
defaults write -g 'NSAutomaticInlinePredictionEnabled' $'<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<false/>
</plist>'
defaults write -g 'NSAutomaticPeriodSubstitutionEnabled' $'<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
Expand Down
1 change: 1 addition & 0 deletions tests/system-defaults-write.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
system.defaults.NSGlobalDomain.AppleShowScrollBars = "Always";
system.defaults.NSGlobalDomain.AppleScrollerPagingBehavior = true;
system.defaults.NSGlobalDomain.NSAutomaticCapitalizationEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticInlinePredictionEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticDashSubstitutionEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticPeriodSubstitutionEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticQuoteSubstitutionEnabled = false;
Expand Down
Loading