1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

defaults: expose-group-by-app -> expose-group-apps

Default was renamed in previous macOS release.
This commit is contained in:
Austin Horstman 2024-11-21 21:40:11 -06:00
parent e30a3622b6
commit 567bae1e17
No known key found for this signature in database
4 changed files with 17 additions and 5 deletions

View file

@ -9,6 +9,9 @@ let
"defaults write ${domain} '${key}' $'${strings.escape [ "'" ] (generators.toPlist { } value)}'"; "defaults write ${domain} '${key}' $'${strings.escape [ "'" ] (generators.toPlist { } value)}'";
defaultsToList = domain: attrs: mapAttrsToList (writeDefault domain) (filterAttrs (n: v: v != null) attrs); defaultsToList = domain: attrs: mapAttrsToList (writeDefault domain) (filterAttrs (n: v: v != null) attrs);
# Filter out options to not pass through
# dock has alias options that we need to ignore
dockFiltered = (builtins.removeAttrs cfg.dock ["expose-group-by-app"]);
# defaults # defaults
alf = defaultsToList "/Library/Preferences/com.apple.alf" cfg.alf; alf = defaultsToList "/Library/Preferences/com.apple.alf" cfg.alf;
@ -21,7 +24,7 @@ let
LaunchServices = defaultsToList "com.apple.LaunchServices" cfg.LaunchServices; LaunchServices = defaultsToList "com.apple.LaunchServices" cfg.LaunchServices;
NSGlobalDomain = defaultsToList "-g" cfg.NSGlobalDomain; NSGlobalDomain = defaultsToList "-g" cfg.NSGlobalDomain;
menuExtraClock = defaultsToList "com.apple.menuextra.clock" cfg.menuExtraClock; menuExtraClock = defaultsToList "com.apple.menuextra.clock" cfg.menuExtraClock;
dock = defaultsToList "com.apple.dock" cfg.dock; dock = defaultsToList "com.apple.dock" dockFiltered;
finder = defaultsToList "com.apple.finder" cfg.finder; finder = defaultsToList "com.apple.finder" cfg.finder;
hitoolbox = defaultsToList "com.apple.HIToolbox" cfg.hitoolbox; hitoolbox = defaultsToList "com.apple.HIToolbox" cfg.hitoolbox;
magicmouse = defaultsToList "com.apple.AppleMultitouchMouse" cfg.magicmouse; magicmouse = defaultsToList "com.apple.AppleMultitouchMouse" cfg.magicmouse;

View file

@ -6,6 +6,10 @@ let
# Should only be used with options that previously used floats defined as strings. # Should only be used with options that previously used floats defined as strings.
inherit (config.lib.defaults.types) floatWithDeprecationError; inherit (config.lib.defaults.types) floatWithDeprecationError;
in { in {
imports = [
(mkRenamedOptionModule [ "system" "defaults" "dock" "expose-group-by-app" ] [ "system" "defaults" "dock" "expose-group-apps" ])
];
options = { options = {
system.defaults.dock.appswitcher-all-displays = mkOption { system.defaults.dock.appswitcher-all-displays = mkOption {
@ -67,11 +71,11 @@ in {
''; '';
}; };
system.defaults.dock.expose-group-by-app = mkOption { system.defaults.dock.expose-group-apps = mkOption {
type = types.nullOr types.bool; type = types.nullOr types.bool;
default = null; default = null;
description = '' description = ''
Whether to group windows by application in Mission Control's Exposé. The default is true. Whether to group windows by application in Mission Control's Exposé. The default is false.
''; '';
}; };
@ -220,7 +224,6 @@ in {
Magnified icon size on hover. The default is 16. Magnified icon size on hover. The default is 16.
''; '';
}; };
system.defaults.dock.wvous-tl-corner = mkOption { system.defaults.dock.wvous-tl-corner = mkOption {
type = types.nullOr types.ints.positive; type = types.nullOr types.ints.positive;

View file

@ -235,6 +235,11 @@ defaults write com.apple.dock 'autohide-delay' $'<?xml version="1.0" encoding="U
<plist version="1.0"> <plist version="1.0">
<real>0.240000</real> <real>0.240000</real>
</plist>' </plist>'
defaults write com.apple.dock 'expose-group-apps' $'<?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">
<true/>
</plist>'
defaults write com.apple.dock 'orientation' $'<?xml version="1.0" encoding="UTF-8"?> defaults write com.apple.dock 'orientation' $'<?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"> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
@ -573,4 +578,4 @@ defaults write ~/Library/Preferences/ByHost/com.apple.controlcenter 'Sound' $'<?
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<integer>24</integer> <integer>24</integer>
</plist>' </plist>'

View file

@ -46,6 +46,7 @@
system.defaults.menuExtraClock.Show24Hour = false; system.defaults.menuExtraClock.Show24Hour = false;
system.defaults.menuExtraClock.ShowDayOfWeek = true; system.defaults.menuExtraClock.ShowDayOfWeek = true;
system.defaults.menuExtraClock.ShowDate = 2; system.defaults.menuExtraClock.ShowDate = 2;
system.defaults.dock.expose-group-apps = true;
system.defaults.dock.appswitcher-all-displays = false; system.defaults.dock.appswitcher-all-displays = false;
system.defaults.dock.autohide-delay = 0.24; system.defaults.dock.autohide-delay = 0.24;
system.defaults.dock.orientation = "left"; system.defaults.dock.orientation = "left";