From 3b087efcbdb72f89e0c80a3ebdf4e091b7a48e41 Mon Sep 17 00:00:00 2001 From: Niklas Ravnsborg Date: Wed, 4 Sep 2024 23:03:14 +0200 Subject: [PATCH] add `NSGlobalDomain.AppleSpacesSwitchOnActivate` option --- modules/system/defaults/NSGlobalDomain.nix | 8 ++++++++ tests/fixtures/system-defaults-write/activate-user.txt | 5 +++++ tests/system-defaults-write.nix | 1 + 3 files changed, 14 insertions(+) diff --git a/modules/system/defaults/NSGlobalDomain.nix b/modules/system/defaults/NSGlobalDomain.nix index 6dcedca6..01e7a459 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 4824a11b..ff05d68a 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' $' Always ' +defaults write -g 'AppleSpacesSwitchOnActivate' $' + + + +' defaults write -g 'AppleWindowTabbingMode' $' diff --git a/tests/system-defaults-write.nix b/tests/system-defaults-write.nix index f91aabe8..35750b45 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;