diff options
| author | Niklas Ravnsborg <niklasravnsborg@gmail.com> | 2024-09-04 23:03:14 +0200 |
|---|---|---|
| committer | Niklas Ravnsborg <niklasravnsborg@gmail.com> | 2024-09-16 10:54:05 +0200 |
| commit | 3b087efcbdb72f89e0c80a3ebdf4e091b7a48e41 (patch) | |
| tree | e8a52a551a62ee6c4156e95903743953fe9cdbbe | |
| parent | 21fe31f26473c180390cfa81e3ea81aca0204c80 (diff) | |
add `NSGlobalDomain.AppleSpacesSwitchOnActivate` option
| -rw-r--r-- | modules/system/defaults/NSGlobalDomain.nix | 8 | ||||
| -rw-r--r-- | tests/fixtures/system-defaults-write/activate-user.txt | 5 | ||||
| -rw-r--r-- | tests/system-defaults-write.nix | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/modules/system/defaults/NSGlobalDomain.nix b/modules/system/defaults/NSGlobalDomain.nix index 6dcedca..01e7a45 100644 --- a/modules/system/defaults/NSGlobalDomain.nix +++ b/modules/system/defaults/NSGlobalDomain.nix @@ -95,6 +95,14 @@ in { ''; }; + system.defaults.NSGlobalDomain.AppleSpacesSwitchOnActivate = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + Whether or not to switch to a workspace that has a window of the application open, that is switched to. The default is true. + ''; + }; + system.defaults.NSGlobalDomain.NSAutomaticCapitalizationEnabled = mkOption { type = types.nullOr types.bool; default = null; diff --git a/tests/fixtures/system-defaults-write/activate-user.txt b/tests/fixtures/system-defaults-write/activate-user.txt index 4824a11..ff05d68 100644 --- a/tests/fixtures/system-defaults-write/activate-user.txt +++ b/tests/fixtures/system-defaults-write/activate-user.txt @@ -48,6 +48,11 @@ defaults write -g 'AppleShowScrollBars' $'<?xml version="1.0" encoding="UTF-8"?> <plist version="1.0"> <string>Always</string> </plist>' +defaults write -g 'AppleSpacesSwitchOnActivate' $'<?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 'AppleWindowTabbingMode' $'<?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"> diff --git a/tests/system-defaults-write.nix b/tests/system-defaults-write.nix index f91aabe..35750b4 100644 --- a/tests/system-defaults-write.nix +++ b/tests/system-defaults-write.nix @@ -11,6 +11,7 @@ system.defaults.NSGlobalDomain.AppleShowAllExtensions = true; system.defaults.NSGlobalDomain.AppleShowScrollBars = "Always"; system.defaults.NSGlobalDomain.AppleScrollerPagingBehavior = true; + system.defaults.NSGlobalDomain.AppleSpacesSwitchOnActivate = false; system.defaults.NSGlobalDomain.NSAutomaticCapitalizationEnabled = false; system.defaults.NSGlobalDomain.NSAutomaticInlinePredictionEnabled = false; system.defaults.NSGlobalDomain.NSAutomaticDashSubstitutionEnabled = false; |
