🐛 defaults seems to be more predictable when lowercase

com.apple.finder AppleShowAllFiles seems more stable than com.apple.Finder for some reason
This commit is contained in:
Yann Bertrand 2022-08-19 13:58:14 +02:00
parent 1a01f7192f
commit b34945d0b1
6 changed files with 15 additions and 15 deletions

View file

@ -322,7 +322,7 @@ categories:
versions: [Monterey, Big Sur, Catalina, Mojave]
after: killall Finder
- key: AppleShowAllFiles
domain: com.apple.Finder
domain: com.apple.finder
title: Afficher les fichiers cachés
description: Afficher les fichiers cachés dans le Finder.
param:

View file

@ -304,7 +304,7 @@ categories:
Some of its features can be customized.
keys:
- key: ShowFullURLInSmartSearchField
domain: com.apple.Safari
domain: com.apple.safari
title: Show full URL
description: Show full website address.
param:
@ -366,7 +366,7 @@ categories:
versions: [Monterey, Big Sur, Catalina, Mojave]
after: killall Finder
- key: AppleShowAllFiles
domain: com.apple.Finder
domain: com.apple.finder
title: Show hidden files
description: Show hidden files in the Finder. You can toggle the value using `⌘ cmd`+`⇧ shift`+`.`.
param:

View file

@ -8,14 +8,14 @@ module.exports = {
try {
const runner = new MacRunner()
await runner
.setDefault('com.apple.Finder', 'AppleShowAllFiles', '-bool false', '0')
.setDefault('com.apple.finder', 'AppleShowAllFiles', '-bool false', '0')
.killApp('Finder')
.wait(1000)
.openApp('Finder', '~')
.activateApp('Finder')
.moveAndResizeApp('Finder', 0, 0, 740, 400)
.captureApp('Finder', `${outputPath}/false.png`)
.deleteDefault('com.apple.Finder', 'AppleShowAllFiles')
.deleteDefault('com.apple.finder', 'AppleShowAllFiles')
.killApp('Finder')
.run()
} catch (runnerError) {
@ -39,6 +39,6 @@ function logRollbackInfo() {
'Please manually run this command to make sure everything is properly reset:'
)
console.info(
'defaults delete com.apple.Finder AppleShowAllFiles && killall Finder'
'defaults delete com.apple.finder AppleShowAllFiles && killall Finder'
)
}

View file

@ -8,14 +8,14 @@ module.exports = {
try {
const runner = new MacRunner()
await runner
.setDefault('com.apple.Finder', 'AppleShowAllFiles', '-bool true', '1')
.setDefault('com.apple.finder', 'AppleShowAllFiles', '-bool true', '1')
.killApp('Finder')
.wait(1000)
.openApp('Finder', '~')
.activateApp('Finder')
.moveAndResizeApp('Finder', 0, 0, 740, 400)
.captureApp('Finder', `${outputPath}/true.png`)
.deleteDefault('com.apple.Finder', 'AppleShowAllFiles')
.deleteDefault('com.apple.finder', 'AppleShowAllFiles')
.killApp('Finder')
.run()
} catch (runnerError) {
@ -39,6 +39,6 @@ function logRollbackInfo() {
'Please manually run this command to make sure everything is properly reset:'
)
console.info(
'defaults delete com.apple.Finder AppleShowAllFiles && killall Finder'
'defaults delete com.apple.finder AppleShowAllFiles && killall Finder'
)
}

View file

@ -10,12 +10,12 @@ module.exports = {
try {
const runner = new MacRunner()
await runner
.setDefault('com.apple.Safari', 'ShowFullURLInSmartSearchField', '-bool false', '0')
.setDefault('com.apple.safari', 'ShowFullURLInSmartSearchField', '-bool false', '0')
.openApp('Safari', '-F https://www.apple.com/macos/monterey/')
.activateApp('Safari')
.moveAndResizeApp('Safari', 0, 0, 740, 250)
.captureApp('Safari', `${outputPath}/false-tmp.png`)
.deleteDefault('com.apple.Safari', 'ShowFullURLInSmartSearchField')
.deleteDefault('com.apple.safari', 'ShowFullURLInSmartSearchField')
.killApp('Safari')
.run()
} catch (runnerError) {
@ -38,5 +38,5 @@ function logRollbackInfo() {
console.info(
'Please manually run this command to make sure everything is properly reset:'
)
console.info('defaults delete com.apple.Safari ShowFullURLInSmartSearchField && killall Safari')
console.info('defaults delete com.apple.safari ShowFullURLInSmartSearchField && killall Safari')
}

View file

@ -10,12 +10,12 @@ module.exports = {
try {
const runner = new MacRunner()
await runner
.setDefault('com.apple.Safari', 'ShowFullURLInSmartSearchField', '-bool true', '1')
.setDefault('com.apple.safari', 'ShowFullURLInSmartSearchField', '-bool true', '1')
.openApp('Safari', '-F https://www.apple.com/macos/monterey/')
.activateApp('Safari')
.moveAndResizeApp('Safari', 0, 0, 740, 250)
.captureApp('Safari', `${outputPath}/true-tmp.png`)
.deleteDefault('com.apple.Safari', 'ShowFullURLInSmartSearchField')
.deleteDefault('com.apple.safari', 'ShowFullURLInSmartSearchField')
.killApp('Safari')
.run()
} catch (runnerError) {
@ -38,5 +38,5 @@ function logRollbackInfo() {
console.info(
'Please manually run this command to make sure everything is properly reset:'
)
console.info('defaults delete com.apple.Safari ShowFullURLInSmartSearchField && killall Safari')
console.info('defaults delete com.apple.safari ShowFullURLInSmartSearchField && killall Safari')
}