Skip to content

windows

Ask to keep changes when closing documents

Section titled “Ask to keep changes when closing documents”

System Settings > Desktop & Dock > Windows > Ask to keep changes when closing documents

Option Module: home-manager

Option Path: applications.systemSettings.desktopAndDock.windows.askToKeepChangesWhenClosingDocuments

Option Value Description: null or boolean or value "unset" (singular enum)

false:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.preference.global NSCloseAlwaysConfirmsChanges -bool "false" 2>/dev/null || true

true:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.preference.global NSCloseAlwaysConfirmsChanges -bool "true" 2>/dev/null || true

unset:

Terminal window
/usr/bin/defaults delete ~/Library/Preferences/ByHost/com.apple.preference.global NSCloseAlwaysConfirmsChanges 2>/dev/null || true

Close windows when quitting an application

Section titled “Close windows when quitting an application”

System Settings > Desktop & Dock > Windows > Close windows when quitting an application

Option Module: home-manager

Option Path: applications.systemSettings.desktopAndDock.windows.closeWindowsWhenQuittingAnApplication

Option Value Description: null or boolean or value "unset" (singular enum)

false:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.preference.global NSQuitAlwaysKeepsWindows -bool "true" 2>/dev/null || true

true:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.preference.global NSQuitAlwaysKeepsWindows -bool "false" 2>/dev/null || true

unset:

Terminal window
/usr/bin/defaults delete ~/Library/Preferences/ByHost/com.apple.preference.global NSQuitAlwaysKeepsWindows 2>/dev/null || true

System Settings > Desktop & Dock > Windows > Drag windows to menu bar to fill screen

Option Module: home-manager

Option Path: applications.systemSettings.desktopAndDock.windows.dragWindowsToMenuBarToFillScreen

Option Value Description: null or boolean or value "unset" (singular enum)

false:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.WindowManager EnableTopTilingByEdgeDrag -bool "false" 2>/dev/null || true

true:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.WindowManager EnableTopTilingByEdgeDrag -bool "true" 2>/dev/null || true

unset:

Terminal window
/usr/bin/defaults delete ~/Library/Preferences/ByHost/com.apple.WindowManager EnableTopTilingByEdgeDrag 2>/dev/null || true

System Settings > Desktop & Dock > Windows > Drag windows to screen edges to tile

Option Module: home-manager

Option Path: applications.systemSettings.desktopAndDock.windows.dragWindowsToScreenEdgesToTile

Option Value Description: null or boolean or value "unset" (singular enum)

false:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.WindowManager EnableTilingByEdgeDrag -bool "false" 2>/dev/null || true

true:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.WindowManager EnableTilingByEdgeDrag -bool "true" 2>/dev/null || true

unset:

Terminal window
/usr/bin/defaults delete ~/Library/Preferences/ByHost/com.apple.WindowManager EnableTilingByEdgeDrag 2>/dev/null || true

Hold Option key while dragging windows to tile

Section titled “Hold Option key while dragging windows to tile”

System Settings > Desktop & Dock > Windows > Hold Option key while dragging windows to tile

Option Module: home-manager

Option Path: applications.systemSettings.desktopAndDock.windows.holdOptionKeyWhileDraggingWindowsToTile

Option Value Description: null or boolean or value "unset" (singular enum)

false:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.WindowManager EnableTilingOptionAccelerator -bool "false" 2>/dev/null || true

true:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.WindowManager EnableTilingOptionAccelerator -bool "true" 2>/dev/null || true

unset:

Terminal window
/usr/bin/defaults delete ~/Library/Preferences/ByHost/com.apple.WindowManager EnableTilingOptionAccelerator 2>/dev/null || true

System Settings > Desktop & Dock > Windows > Prefer tabs when opening documents

Option Module: home-manager

Option Path: applications.systemSettings.desktopAndDock.windows.preferTabsWhenOpeningDocuments

Option Value Description: null or one of "Always", "In Full Screen", "Never", "unset"

Always:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.preference.global AppleWindowTabbingMode -string "always" 2>/dev/null || true

In Full Screen:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.preference.global AppleWindowTabbingMode -string "fullscreen" 2>/dev/null || true

Never:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.preference.global AppleWindowTabbingMode -string "manual" 2>/dev/null || true

unset:

Terminal window
/usr/bin/defaults delete ~/Library/Preferences/ByHost/com.apple.preference.global AppleWindowTabbingMode 2>/dev/null || true

System Settings > Desktop & Dock > Windows > Tiled windows have margin

Option Module: home-manager

Option Path: applications.systemSettings.desktopAndDock.windows.tiledWindowsHaveMargin

Option Value Description: null or boolean or value "unset" (singular enum)

false:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.WindowManager EnableTiledWindowMargins -bool "false" 2>/dev/null || true

true:

Terminal window
/usr/bin/defaults write ~/Library/Preferences/ByHost/com.apple.WindowManager EnableTiledWindowMargins -bool "true" 2>/dev/null || true

unset:

Terminal window
/usr/bin/defaults delete ~/Library/Preferences/ByHost/com.apple.WindowManager EnableTiledWindowMargins 2>/dev/null || true