Skip to content

Commit

Permalink
Merge pull request #673 from sxyazi/pr-4df4da65
Browse files Browse the repository at this point in the history
feat: add `AppleWindowTabbingMode` option
  • Loading branch information
LnL7 authored Jun 20, 2023
2 parents 681c152 + cfcfcc5 commit 689aa79
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/system/defaults/NSGlobalDomain.nix
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ in {
'';
};

system.defaults.NSGlobalDomain.AppleWindowTabbingMode = mkOption {
type = types.nullOr (types.enum [ "manual" "always" "fullscreen" ]);
default = null;
description = ''
Sets the window tabbing when opening a new document: 'manual', 'always', or 'fullscreen'. The default is 'fullscreen'.
'';
};

system.defaults.NSGlobalDomain.NSNavPanelExpandedStateForSaveMode = mkOption {
type = types.nullOr types.bool;
default = null;
Expand Down
2 changes: 2 additions & 0 deletions tests/system-defaults-write.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
system.defaults.NSGlobalDomain.NSAutomaticWindowAnimationsEnabled = false;
system.defaults.NSGlobalDomain.NSDisableAutomaticTermination = true;
system.defaults.NSGlobalDomain.NSDocumentSaveNewDocumentsToCloud = false;
system.defaults.NSGlobalDomain.AppleWindowTabbingMode = "always";
system.defaults.NSGlobalDomain.NSNavPanelExpandedStateForSaveMode = true;
system.defaults.NSGlobalDomain.NSNavPanelExpandedStateForSaveMode2 = true;
system.defaults.NSGlobalDomain.NSTableViewDefaultSizeMode = 2;
Expand Down Expand Up @@ -86,6 +87,7 @@
grep "defaults write -g 'NSAutomaticWindowAnimationsEnabled' -bool NO" ${config.out}/activate-user
grep "defaults write -g 'NSDisableAutomaticTermination' -bool YES" ${config.out}/activate-user
grep "defaults write -g 'NSDocumentSaveNewDocumentsToCloud' -bool NO" ${config.out}/activate-user
grep "defaults write -g 'AppleWindowTabbingMode' -string 'always'" ${config.out}/activate-user
grep "defaults write -g 'NSNavPanelExpandedStateForSaveMode' -bool YES" ${config.out}/activate-user
grep "defaults write -g 'NSNavPanelExpandedStateForSaveMode2' -bool YES" ${config.out}/activate-user
grep "defaults write -g 'NSTableViewDefaultSizeMode' -int 2" ${config.out}/activate-user
Expand Down

0 comments on commit 689aa79

Please sign in to comment.