mirror of
https://github.com/yannbertrand/macos-defaults
synced 2024-12-13 13:12:30 +00:00
⬆️ Upgrade prettier to v3 (#306)
* ⬆️ Upgrade prettier to v3 * 🚨 Run prettier v3 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Yann Bertrand <5855339+yannbertrand@users.noreply.github.com>
This commit is contained in:
parent
e1d1cc556b
commit
78d713f8ab
50 changed files with 175 additions and 175 deletions
|
@ -18,7 +18,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@netlify/plugin-lighthouse": "5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.0",
|
||||
"rimraf": "5.0.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,11 +10,11 @@ module.exports = {
|
|||
console.log('> Recording dock autohide-delay with param set to 0.5')
|
||||
|
||||
const { stderr: setEnvError } = await exec(
|
||||
'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-delay -float 0.5 && killall Dock'
|
||||
'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-delay -float 0.5 && killall Dock',
|
||||
)
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the dock autohide-delay command'
|
||||
'An error occured while setting up the dock autohide-delay command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -65,11 +65,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock'
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the dock autohide-delay environment'
|
||||
'An error occured while cleaning the dock autohide-delay environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -81,9 +81,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock'
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -10,11 +10,11 @@ module.exports = {
|
|||
console.log('> Recording dock autohide-delay with param set to 0')
|
||||
|
||||
const { stderr: setEnvError } = await exec(
|
||||
'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-delay -float 0 && killall Dock'
|
||||
'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-delay -float 0 && killall Dock',
|
||||
)
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the dock autohide-delay command'
|
||||
'An error occured while setting up the dock autohide-delay command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -65,11 +65,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock'
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the dock autohide-delay environment'
|
||||
'An error occured while cleaning the dock autohide-delay environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -81,9 +81,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock'
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-delay && killall Dock',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -10,11 +10,11 @@ module.exports = {
|
|||
console.log('> Recording dock autohide-time-modifier with param set to 0.5')
|
||||
|
||||
const { stderr: setEnvError } = await exec(
|
||||
'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-time-modifier -float 0.5 && killall Dock'
|
||||
'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-time-modifier -float 0.5 && killall Dock',
|
||||
)
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the dock autohide-time-modifier command'
|
||||
'An error occured while setting up the dock autohide-time-modifier command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -65,11 +65,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock'
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the dock autohide-time-modifier environment'
|
||||
'An error occured while cleaning the dock autohide-time-modifier environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -81,9 +81,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock'
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -10,11 +10,11 @@ module.exports = {
|
|||
console.log('> Recording dock autohide-time-modifier with param set to 0')
|
||||
|
||||
const { stderr: setEnvError } = await exec(
|
||||
'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-time-modifier -float 0 && killall Dock'
|
||||
'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-time-modifier -float 0 && killall Dock',
|
||||
)
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the dock autohide-time-modifier command'
|
||||
'An error occured while setting up the dock autohide-time-modifier command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -65,11 +65,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock'
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the dock autohide-time-modifier environment'
|
||||
'An error occured while cleaning the dock autohide-time-modifier environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -81,9 +81,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock'
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -10,11 +10,11 @@ module.exports = {
|
|||
console.log('> Recording dock autohide-time-modifier with param set to 2')
|
||||
|
||||
const { stderr: setEnvError } = await exec(
|
||||
'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-time-modifier -float 2 && killall Dock'
|
||||
'defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-time-modifier -float 2 && killall Dock',
|
||||
)
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the dock autohide-time-modifier command'
|
||||
'An error occured while setting up the dock autohide-time-modifier command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -65,11 +65,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock'
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the dock autohide-time-modifier environment'
|
||||
'An error occured while cleaning the dock autohide-time-modifier environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -81,9 +81,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock'
|
||||
'defaults delete com.apple.dock autohide && defaults delete com.apple.dock autohide-time-modifier && killall Dock',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -14,11 +14,11 @@ module.exports = {
|
|||
console.log('> Recording dock mineffect with param set to genie')
|
||||
|
||||
const { stderr: setEnvError } = await exec(
|
||||
'defaults write com.apple.dock mineffect -string genie && killall Dock'
|
||||
'defaults write com.apple.dock mineffect -string genie && killall Dock',
|
||||
)
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the dock mineffect command'
|
||||
'An error occured while setting up the dock mineffect command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -75,11 +75,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.dock mineffect && killall Dock'
|
||||
'defaults delete com.apple.dock mineffect && killall Dock',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the dock mineffect environment'
|
||||
'An error occured while cleaning the dock mineffect environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -91,7 +91,7 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info('defaults delete com.apple.dock mineffect && killall Dock')
|
||||
}
|
||||
|
|
|
@ -14,11 +14,11 @@ module.exports = {
|
|||
console.log('> Recording dock mineffect with param set to scale')
|
||||
|
||||
const { stderr: setEnvError } = await exec(
|
||||
'defaults write com.apple.dock mineffect -string scale && killall Dock'
|
||||
'defaults write com.apple.dock mineffect -string scale && killall Dock',
|
||||
)
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the dock mineffect command'
|
||||
'An error occured while setting up the dock mineffect command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -75,11 +75,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.dock mineffect && killall Dock'
|
||||
'defaults delete com.apple.dock mineffect && killall Dock',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the dock mineffect environment'
|
||||
'An error occured while cleaning the dock mineffect environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -91,7 +91,7 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info('defaults delete com.apple.dock mineffect && killall Dock')
|
||||
}
|
||||
|
|
|
@ -14,11 +14,11 @@ module.exports = {
|
|||
console.log('> Recording dock mineffect with param set to suck')
|
||||
|
||||
const { stderr: setEnvError } = await exec(
|
||||
'defaults write com.apple.dock mineffect -string suck && killall Dock'
|
||||
'defaults write com.apple.dock mineffect -string suck && killall Dock',
|
||||
)
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the dock mineffect command'
|
||||
'An error occured while setting up the dock mineffect command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -75,11 +75,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.dock mineffect && killall Dock'
|
||||
'defaults delete com.apple.dock mineffect && killall Dock',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the dock mineffect environment'
|
||||
'An error occured while cleaning the dock mineffect environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -91,7 +91,7 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info('defaults delete com.apple.dock mineffect && killall Dock')
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ module.exports = {
|
|||
await compressPngImage(
|
||||
`${outputPath}/bottom-tmp.png`,
|
||||
outputPath,
|
||||
'bottom'
|
||||
'bottom',
|
||||
)
|
||||
} catch (compressPngImageError) {
|
||||
logRollbackInfo()
|
||||
|
@ -37,7 +37,7 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info('defaults delete com.apple.dock orientation && killall Dock')
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info('defaults delete com.apple.dock orientation && killall Dock')
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info('defaults delete com.apple.dock orientation && killall Dock')
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ module.exports = {
|
|||
screenHeight - dockHeight,
|
||||
screenWidth,
|
||||
dockHeight,
|
||||
`${outputPath}/dock-tmp.png`
|
||||
`${outputPath}/dock-tmp.png`,
|
||||
)
|
||||
.run()
|
||||
} catch (runnerError) {
|
||||
|
|
|
@ -21,7 +21,7 @@ module.exports = {
|
|||
screenHeight - dockHeight,
|
||||
740,
|
||||
dockHeight,
|
||||
`${outputPath}/false-tmp.png`
|
||||
`${outputPath}/false-tmp.png`,
|
||||
)
|
||||
.deleteDefault('com.apple.dock', 'show-recents')
|
||||
.killApp('Dock')
|
||||
|
@ -44,7 +44,7 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info('defaults delete com.apple.dock show-recents && killall Dock')
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ module.exports = {
|
|||
screenHeight - dockHeight,
|
||||
740,
|
||||
dockHeight,
|
||||
`${outputPath}/true-tmp.png`
|
||||
`${outputPath}/true-tmp.png`,
|
||||
)
|
||||
.deleteDefault('com.apple.dock', 'show-recents')
|
||||
.killApp('Dock')
|
||||
|
@ -42,7 +42,7 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info('defaults delete com.apple.dock show-recents && killall Dock')
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info('defaults delete com.apple.dock tilesize && killall Dock')
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info('defaults delete com.apple.dock tilesize && killall Dock')
|
||||
}
|
||||
|
|
|
@ -36,9 +36,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'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',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -36,9 +36,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'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',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ const { compressVideo } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording finder FXEnableExtensionChangeWarning with param set to false'
|
||||
'> Recording finder FXEnableExtensionChangeWarning with param set to false',
|
||||
)
|
||||
|
||||
const { width, height } = robot.getScreenSize()
|
||||
|
@ -26,7 +26,7 @@ module.exports = {
|
|||
'com.apple.finder',
|
||||
'FXEnableExtensionChangeWarning',
|
||||
'-bool false',
|
||||
'0'
|
||||
'0',
|
||||
)
|
||||
.killApp('Finder')
|
||||
.openApp('Finder', '~/macos-defaults')
|
||||
|
@ -71,9 +71,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.finder FXEnableExtensionChangeWarning && killall Finder'
|
||||
'defaults delete com.apple.finder FXEnableExtensionChangeWarning && killall Finder',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ const { compressVideo } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording finder FXEnableExtensionChangeWarning with param set to true'
|
||||
'> Recording finder FXEnableExtensionChangeWarning with param set to true',
|
||||
)
|
||||
|
||||
const { width, height } = robot.getScreenSize()
|
||||
|
@ -26,7 +26,7 @@ module.exports = {
|
|||
'com.apple.finder',
|
||||
'FXEnableExtensionChangeWarning',
|
||||
'-bool true',
|
||||
'1'
|
||||
'1',
|
||||
)
|
||||
.killApp('Finder')
|
||||
.openApp('Finder', '~/macos-defaults')
|
||||
|
@ -67,9 +67,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.finder FXEnableExtensionChangeWarning && killall Finder'
|
||||
'defaults delete com.apple.finder FXEnableExtensionChangeWarning && killall Finder',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ module.exports = {
|
|||
'NSGlobalDomain',
|
||||
'NSTableViewDefaultSizeMode',
|
||||
'-int 1',
|
||||
'1'
|
||||
'1',
|
||||
)
|
||||
.killApp('Finder')
|
||||
.openApp('Finder', '~/macos-defaults')
|
||||
|
@ -40,9 +40,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete NSGlobalDomain NSTableViewDefaultSizeMode && killall Finder'
|
||||
'defaults delete NSGlobalDomain NSTableViewDefaultSizeMode && killall Finder',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ module.exports = {
|
|||
'NSGlobalDomain',
|
||||
'NSTableViewDefaultSizeMode',
|
||||
'-int 2',
|
||||
'2'
|
||||
'2',
|
||||
)
|
||||
.killApp('Finder')
|
||||
.openApp('Finder', '~/macos-defaults')
|
||||
|
@ -40,9 +40,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete NSGlobalDomain NSTableViewDefaultSizeMode && killall Finder'
|
||||
'defaults delete NSGlobalDomain NSTableViewDefaultSizeMode && killall Finder',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ module.exports = {
|
|||
'NSGlobalDomain',
|
||||
'NSTableViewDefaultSizeMode',
|
||||
'-int 3',
|
||||
'3'
|
||||
'3',
|
||||
)
|
||||
.killApp('Finder')
|
||||
.openApp('Finder', '~/macos-defaults')
|
||||
|
@ -40,9 +40,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete NSGlobalDomain NSTableViewDefaultSizeMode && killall Finder'
|
||||
'defaults delete NSGlobalDomain NSTableViewDefaultSizeMode && killall Finder',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ const { compressVideo } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording finder NSToolbarTitleViewRolloverDelay with param set to 0'
|
||||
'> Recording finder NSToolbarTitleViewRolloverDelay with param set to 0',
|
||||
)
|
||||
|
||||
const { width, height } = robot.getScreenSize()
|
||||
|
@ -34,7 +34,7 @@ module.exports = {
|
|||
'NSGlobalDomain',
|
||||
'NSToolbarTitleViewRolloverDelay',
|
||||
'-float 0',
|
||||
'0'
|
||||
'0',
|
||||
)
|
||||
.killApp('Finder')
|
||||
.openApp('Finder', '~/macos-defaults')
|
||||
|
@ -69,9 +69,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete NSGlobalDomain NSToolbarTitleViewRolloverDelay && killall Finder'
|
||||
'defaults delete NSGlobalDomain NSToolbarTitleViewRolloverDelay && killall Finder',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ const { compressVideo } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording finder NSToolbarTitleViewRolloverDelay with param set to 0.5'
|
||||
'> Recording finder NSToolbarTitleViewRolloverDelay with param set to 0.5',
|
||||
)
|
||||
|
||||
const { width, height } = robot.getScreenSize()
|
||||
|
@ -34,7 +34,7 @@ module.exports = {
|
|||
'NSGlobalDomain',
|
||||
'NSToolbarTitleViewRolloverDelay',
|
||||
'-float 0.5',
|
||||
'0.5'
|
||||
'0.5',
|
||||
)
|
||||
.killApp('Finder')
|
||||
.openApp('Finder', '~/macos-defaults')
|
||||
|
@ -69,9 +69,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete NSGlobalDomain NSToolbarTitleViewRolloverDelay && killall Finder'
|
||||
'defaults delete NSGlobalDomain NSToolbarTitleViewRolloverDelay && killall Finder',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ const { compressVideo } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording finder NSToolbarTitleViewRolloverDelay with param set to 1'
|
||||
'> Recording finder NSToolbarTitleViewRolloverDelay with param set to 1',
|
||||
)
|
||||
|
||||
const { width, height } = robot.getScreenSize()
|
||||
|
@ -34,7 +34,7 @@ module.exports = {
|
|||
'NSGlobalDomain',
|
||||
'NSToolbarTitleViewRolloverDelay',
|
||||
'-float 1',
|
||||
'1'
|
||||
'1',
|
||||
)
|
||||
.killApp('Finder')
|
||||
.openApp('Finder', '~/macos-defaults')
|
||||
|
@ -69,9 +69,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete NSGlobalDomain NSToolbarTitleViewRolloverDelay && killall Finder'
|
||||
'defaults delete NSGlobalDomain NSToolbarTitleViewRolloverDelay && killall Finder',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info('defaults delete com.apple.finder ShowPathbar && killall Finder')
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info('defaults delete com.apple.finder ShowPathbar && killall Finder')
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ const { compressPngImage } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording finder _FXSortFoldersFirst with param set to false'
|
||||
'> Recording finder _FXSortFoldersFirst with param set to false',
|
||||
)
|
||||
|
||||
try {
|
||||
|
@ -14,7 +14,7 @@ module.exports = {
|
|||
'com.apple.finder',
|
||||
'_FXSortFoldersFirst',
|
||||
'-bool false',
|
||||
'0'
|
||||
'0',
|
||||
)
|
||||
.killApp('Finder')
|
||||
.openApp('Finder', '~/macos-defaults')
|
||||
|
@ -42,9 +42,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.finder _FXSortFoldersFirst && killall Finder'
|
||||
'defaults delete com.apple.finder _FXSortFoldersFirst && killall Finder',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ module.exports = {
|
|||
'com.apple.finder',
|
||||
'_FXSortFoldersFirst',
|
||||
'-bool true',
|
||||
'1'
|
||||
'1',
|
||||
)
|
||||
.killApp('Finder')
|
||||
.openApp('Finder', '~/macos-defaults')
|
||||
|
@ -40,9 +40,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.finder _FXSortFoldersFirst && killall Finder'
|
||||
'defaults delete com.apple.finder _FXSortFoldersFirst && killall Finder',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ module.exports = {
|
|||
'com.apple.universalaccess',
|
||||
'showWindowTitlebarIcons',
|
||||
'-bool false',
|
||||
'0'
|
||||
'0',
|
||||
)
|
||||
.killApp('Finder')
|
||||
.openApp('Finder', '~/macos-defaults')
|
||||
|
@ -40,9 +40,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.universalaccess showWindowTitlebarIcons && killall Finder'
|
||||
'defaults delete com.apple.universalaccess showWindowTitlebarIcons && killall Finder',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ module.exports = {
|
|||
'com.apple.universalaccess',
|
||||
'showWindowTitlebarIcons',
|
||||
'-bool true',
|
||||
'1'
|
||||
'1',
|
||||
)
|
||||
.killApp('Finder')
|
||||
.openApp('Finder', '~/macos-defaults')
|
||||
|
@ -40,9 +40,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.universalaccess showWindowTitlebarIcons && killall Finder'
|
||||
'defaults delete com.apple.universalaccess showWindowTitlebarIcons && killall Finder',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ class MacRunner {
|
|||
*/
|
||||
activateApp(appName) {
|
||||
return this.register(() =>
|
||||
execCommand(`osascript -e 'tell application "${appName}" to activate'`)
|
||||
execCommand(`osascript -e 'tell application "${appName}" to activate'`),
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -126,8 +126,8 @@ class MacRunner {
|
|||
const v = { start: y, end: y + height }
|
||||
return this.register(() =>
|
||||
execCommand(
|
||||
`osascript -e 'tell application "${appName}" to set the bounds of the first window to {${h.start}, ${v.start}, ${h.end}, ${v.end}}'`
|
||||
)
|
||||
`osascript -e 'tell application "${appName}" to set the bounds of the first window to {${h.start}, ${v.start}, ${h.end}, ${v.end}}'`,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ class MacRunner {
|
|||
*/
|
||||
captureScreenRect(x, y, width, height, output) {
|
||||
return this.register(() =>
|
||||
execCommand(`screencapture -R${x},${y},${width},${height} ${output}`)
|
||||
execCommand(`screencapture -R${x},${y},${width},${height} ${output}`),
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -167,8 +167,8 @@ class MacRunner {
|
|||
execCommand(
|
||||
`screencapture ${
|
||||
disableShadow ? '-o' : ''
|
||||
} -l$(osascript -e 'tell app "${appName}" to id of window 1') ${output}`
|
||||
)
|
||||
} -l$(osascript -e 'tell app "${appName}" to id of window 1') ${output}`,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -8,17 +8,17 @@ const { makeAppActive, compressVideo } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording menu bar clock DateFormat with param set to "EEE HH:mm:ss"'
|
||||
'> Recording menu bar clock DateFormat with param set to "EEE HH:mm:ss"',
|
||||
)
|
||||
|
||||
// Set the menu bar menuExtras to only show the clock, it will be on the left of notification center, siri, and spotlight search.
|
||||
const { stderr: setEnvError } = await exec(
|
||||
`defaults write com.apple.menuextra.clock DateFormat -string "EEE HH:mm:ss" && killall SystemUIServer && sleep 10`
|
||||
`defaults write com.apple.menuextra.clock DateFormat -string "EEE HH:mm:ss" && killall SystemUIServer && sleep 10`,
|
||||
)
|
||||
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the menu bar clock DateFormat command'
|
||||
'An error occured while setting up the menu bar clock DateFormat command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -51,11 +51,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer && sleep 5'
|
||||
'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer && sleep 5',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the menu bar clock DateFormat environment'
|
||||
'An error occured while cleaning the menu bar clock DateFormat environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -67,9 +67,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer'
|
||||
'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -8,17 +8,17 @@ const { makeAppActive, compressVideo } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording menu bar clock DateFormat with param set to "EEE d MMM HH:mm:ss"'
|
||||
'> Recording menu bar clock DateFormat with param set to "EEE d MMM HH:mm:ss"',
|
||||
)
|
||||
|
||||
// Set the menu bar menuExtras to only show the clock, it will be on the left of notification center, siri, and spotlight search.
|
||||
const { stderr: setEnvError } = await exec(
|
||||
`defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM HH:mm:ss" && killall SystemUIServer && sleep 10`
|
||||
`defaults write com.apple.menuextra.clock DateFormat -string "EEE d MMM HH:mm:ss" && killall SystemUIServer && sleep 10`,
|
||||
)
|
||||
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the menu bar clock DateFormat command'
|
||||
'An error occured while setting up the menu bar clock DateFormat command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -51,11 +51,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer && sleep 5'
|
||||
'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer && sleep 5',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the menu bar clock DateFormat environment'
|
||||
'An error occured while cleaning the menu bar clock DateFormat environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -67,9 +67,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer'
|
||||
'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -8,17 +8,17 @@ const { makeAppActive, compressVideo } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording menu bar clock DateFormat with param set to "EEE h:mm:ss"'
|
||||
'> Recording menu bar clock DateFormat with param set to "EEE h:mm:ss"',
|
||||
)
|
||||
|
||||
// Set the menu bar menuExtras to only show the clock, it will be on the left of notification center, siri, and spotlight search.
|
||||
const { stderr: setEnvError } = await exec(
|
||||
`defaults write com.apple.menuextra.clock DateFormat -string "EEE h:mm:ss" && killall SystemUIServer && sleep 10`
|
||||
`defaults write com.apple.menuextra.clock DateFormat -string "EEE h:mm:ss" && killall SystemUIServer && sleep 10`,
|
||||
)
|
||||
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the menu bar clock DateFormat command'
|
||||
'An error occured while setting up the menu bar clock DateFormat command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -51,11 +51,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer && sleep 5'
|
||||
'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer && sleep 5',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the menu bar clock DateFormat environment'
|
||||
'An error occured while cleaning the menu bar clock DateFormat environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -67,9 +67,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer'
|
||||
'defaults delete com.apple.menuextra.clock DateFormat && killall SystemUIServer',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -8,17 +8,17 @@ const { makeAppActive, compressVideo } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording menu bar clock FlashDateSeparators with param set to false'
|
||||
'> Recording menu bar clock FlashDateSeparators with param set to false',
|
||||
)
|
||||
|
||||
// Set the menu bar menuExtras to only show the clock, it will be on the left of notification center, siri, and spotlight search.
|
||||
const { stderr: setEnvError } = await exec(
|
||||
`defaults write com.apple.menuextra.clock FlashDateSeparators -bool false && killall SystemUIServer && sleep 10`
|
||||
`defaults write com.apple.menuextra.clock FlashDateSeparators -bool false && killall SystemUIServer && sleep 10`,
|
||||
)
|
||||
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the menu bar clock FlashDateSeparators command'
|
||||
'An error occured while setting up the menu bar clock FlashDateSeparators command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -51,11 +51,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer && sleep 10'
|
||||
'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer && sleep 10',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the menu bar clock FlashDateSeparators environment'
|
||||
'An error occured while cleaning the menu bar clock FlashDateSeparators environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -67,9 +67,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer'
|
||||
'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -8,17 +8,17 @@ const { makeAppActive, compressVideo } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording menu bar clock FlashDateSeparators with param set to true'
|
||||
'> Recording menu bar clock FlashDateSeparators with param set to true',
|
||||
)
|
||||
|
||||
// Set the menu bar menuExtras to only show the clock, it will be on the left of notification center, siri, and spotlight search.
|
||||
const { stderr: setEnvError } = await exec(
|
||||
`defaults write com.apple.menuextra.clock FlashDateSeparators -bool true && killall SystemUIServer && sleep 10`
|
||||
`defaults write com.apple.menuextra.clock FlashDateSeparators -bool true && killall SystemUIServer && sleep 10`,
|
||||
)
|
||||
|
||||
if (setEnvError) {
|
||||
console.error(
|
||||
'An error occured while setting up the menu bar clock FlashDateSeparators command'
|
||||
'An error occured while setting up the menu bar clock FlashDateSeparators command',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(setEnvError)
|
||||
|
@ -51,11 +51,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
const { stderr: deleteEnvError } = await exec(
|
||||
'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer && sleep 10'
|
||||
'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer && sleep 10',
|
||||
)
|
||||
if (deleteEnvError) {
|
||||
console.error(
|
||||
'An error occured while cleaning the menu bar clock FlashDateSeparators environment'
|
||||
'An error occured while cleaning the menu bar clock FlashDateSeparators environment',
|
||||
)
|
||||
logRollbackInfo()
|
||||
throw new Error(deleteEnvError)
|
||||
|
@ -67,9 +67,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer'
|
||||
'defaults delete com.apple.menuextra.clock FlashDateSeparators && killall SystemUIServer',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"jimp": "0.22.10",
|
||||
"mkdirp": "^2",
|
||||
"node-pngquant-native": "2.2.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.0",
|
||||
"prompt-confirm": "2.0.4",
|
||||
"robotjs": "0.6.0",
|
||||
"sharp": "0.32.5"
|
||||
|
|
|
@ -32,7 +32,7 @@ module.exports = async (files) => {
|
|||
await makeAppActive('iTerm')
|
||||
|
||||
console.info(
|
||||
`\nAll videos and screenshots were successfully recorded. You can use your mouse again\n`
|
||||
`\nAll videos and screenshots were successfully recorded. You can use your mouse again\n`,
|
||||
)
|
||||
} catch (error) {
|
||||
await makeAppActive('iTerm')
|
||||
|
@ -40,10 +40,10 @@ module.exports = async (files) => {
|
|||
if (error.code === 'RECORDER_TIMEOUT') {
|
||||
console.info('The recorder timed out.')
|
||||
console.info(
|
||||
"You probably need to activate the screen recording feature for the terminal you're using."
|
||||
"You probably need to activate the screen recording feature for the terminal you're using.",
|
||||
)
|
||||
console.info(
|
||||
"You'll find that settings under: System Parameters > Security & Confidentiality > Confidentiality > Screen recording"
|
||||
"You'll find that settings under: System Parameters > Security & Confidentiality > Confidentiality > Screen recording",
|
||||
)
|
||||
} else if (error.code === 'ENOTDIR') {
|
||||
console.info('A mandatory folder was not found.')
|
||||
|
|
|
@ -4,7 +4,7 @@ const { compressPngImage } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording safari ShowFullURLInSmartSearchField with param set to false'
|
||||
'> Recording safari ShowFullURLInSmartSearchField with param set to false',
|
||||
)
|
||||
|
||||
try {
|
||||
|
@ -14,7 +14,7 @@ module.exports = {
|
|||
'com.apple.Safari',
|
||||
'ShowFullURLInSmartSearchField',
|
||||
'-bool false',
|
||||
'0'
|
||||
'0',
|
||||
)
|
||||
.openApp('Safari', '-F https://www.apple.com/macos/ventura/')
|
||||
.activateApp('Safari')
|
||||
|
@ -41,9 +41,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.Safari ShowFullURLInSmartSearchField && killall Safari'
|
||||
'defaults delete com.apple.Safari ShowFullURLInSmartSearchField && killall Safari',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ const { compressPngImage } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording safari ShowFullURLInSmartSearchField with param set to true'
|
||||
'> Recording safari ShowFullURLInSmartSearchField with param set to true',
|
||||
)
|
||||
|
||||
try {
|
||||
|
@ -14,7 +14,7 @@ module.exports = {
|
|||
'com.apple.Safari',
|
||||
'ShowFullURLInSmartSearchField',
|
||||
'-bool true',
|
||||
'1'
|
||||
'1',
|
||||
)
|
||||
.openApp('Safari', '-F https://www.apple.com/macos/ventura/')
|
||||
.activateApp('Safari')
|
||||
|
@ -41,9 +41,9 @@ module.exports = {
|
|||
|
||||
function logRollbackInfo() {
|
||||
console.info(
|
||||
'Please manually run this command to make sure everything is properly reset:'
|
||||
'Please manually run this command to make sure everything is properly reset:',
|
||||
)
|
||||
console.info(
|
||||
'defaults delete com.apple.Safari ShowFullURLInSmartSearchField && killall Safari'
|
||||
'defaults delete com.apple.Safari ShowFullURLInSmartSearchField && killall Safari',
|
||||
)
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ const { compressPngImage } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording screencapture disable-shadow with param set to false'
|
||||
'> Recording screencapture disable-shadow with param set to false',
|
||||
)
|
||||
|
||||
try {
|
||||
|
|
|
@ -4,7 +4,7 @@ const { compressPngImage } = require('../../utils')
|
|||
module.exports = {
|
||||
run: async (outputPath) => {
|
||||
console.log(
|
||||
'> Recording screencapture disable-shadow with param set to true'
|
||||
'> Recording screencapture disable-shadow with param set to true',
|
||||
)
|
||||
|
||||
try {
|
||||
|
|
|
@ -40,7 +40,7 @@ module.exports = {
|
|||
async function manageFile(filename, create) {
|
||||
console.log(` Command: ${create ? 'create' : 'remove'} ${filename}`)
|
||||
const { stderr: mngFile } = await exec(
|
||||
`${create ? 'touch' : 'rm -f'} ${filename}`
|
||||
`${create ? 'touch' : 'rm -f'} ${filename}`,
|
||||
)
|
||||
if (mngFile) {
|
||||
console.error('An error occured while working with a file')
|
||||
|
@ -53,7 +53,7 @@ async function addContentToFile(filename, content) {
|
|||
const { stderr: mngFile } = await exec(
|
||||
`cat > ${filename} << EOF
|
||||
${content}
|
||||
EOF`
|
||||
EOF`,
|
||||
)
|
||||
if (mngFile) {
|
||||
console.error('An error occured while working with a file')
|
||||
|
|
|
@ -12,7 +12,7 @@ module.exports = {
|
|||
await manageFile(filename, true)
|
||||
await addContentToFile(
|
||||
filename,
|
||||
'{\\rtf1\\ansi\\ansicpg1252\\cocoartf2577\\cocoatextscaling0\\cocoaplatform0{\\fonttbl}{\\colortbl;\\red255\\green255\\blue255;}{\\*\\expandedcolortbl;;}\\paperw11900\\paperh16840\\margl1440\\margr1440\\vieww11520\\viewh8400\\viewkind0}'
|
||||
'{\\rtf1\\ansi\\ansicpg1252\\cocoartf2577\\cocoatextscaling0\\cocoaplatform0{\\fonttbl}{\\colortbl;\\red255\\green255\\blue255;}{\\*\\expandedcolortbl;;}\\paperw11900\\paperh16840\\margl1440\\margr1440\\vieww11520\\viewh8400\\viewkind0}',
|
||||
)
|
||||
|
||||
const runner = new MacRunner()
|
||||
|
@ -43,7 +43,7 @@ module.exports = {
|
|||
async function manageFile(filename, create) {
|
||||
console.log(` Command: ${create ? 'create' : 'remove'} ${filename}`)
|
||||
const { stderr: mngFile } = await exec(
|
||||
`${create ? 'touch' : 'rm -f'} ${filename}`
|
||||
`${create ? 'touch' : 'rm -f'} ${filename}`,
|
||||
)
|
||||
if (mngFile) {
|
||||
console.error('An error occured while working with a file')
|
||||
|
@ -56,7 +56,7 @@ async function addContentToFile(filename, content) {
|
|||
const { stderr: mngFile } = await exec(
|
||||
`cat > ${filename} << EOF
|
||||
${content}
|
||||
EOF`
|
||||
EOF`,
|
||||
)
|
||||
if (mngFile) {
|
||||
console.error('An error occured while working with a file')
|
||||
|
|
|
@ -34,7 +34,7 @@ module.exports.captureImage = (x, y, w, h) => {
|
|||
module.exports.compressPngImage = async (
|
||||
inputPath,
|
||||
outputFolder,
|
||||
outputName
|
||||
outputName,
|
||||
) => {
|
||||
const tmpOutput = `${outputFolder}/${outputName}-tmp.png`
|
||||
const finalOutput = `${outputFolder}/${outputName}.png`
|
||||
|
@ -106,7 +106,7 @@ function resizeVideo(input, output) {
|
|||
])
|
||||
|
||||
ffmpeg.stderr.on('data', (message) =>
|
||||
ffmpegRawLogs.push(message.toString('utf8'))
|
||||
ffmpegRawLogs.push(message.toString('utf8')),
|
||||
)
|
||||
ffmpeg.on('exit', (ffmpegExitCode) => {
|
||||
if (process.env.NODE_ENV === 'DEBUG') {
|
||||
|
|
|
@ -1775,10 +1775,10 @@ prebuild-install@^7.1.1:
|
|||
tar-fs "^2.0.0"
|
||||
tunnel-agent "^0.6.0"
|
||||
|
||||
prettier@^2.8.8:
|
||||
version "2.8.8"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
|
||||
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
|
||||
prettier@^3.0.0:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643"
|
||||
integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==
|
||||
|
||||
process-nextick-args@~2.0.0:
|
||||
version "2.0.1"
|
||||
|
|
|
@ -1677,10 +1677,10 @@ preact@^10.0.0:
|
|||
resolved "https://registry.yarnpkg.com/preact/-/preact-10.17.1.tgz#0a1b3c658c019e759326b9648c62912cf5c2dde1"
|
||||
integrity sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA==
|
||||
|
||||
prettier@^2.8.8:
|
||||
version "2.8.8"
|
||||
resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz"
|
||||
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
|
||||
prettier@^3.0.0:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643"
|
||||
integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==
|
||||
|
||||
progress@2.0.3:
|
||||
version "2.0.3"
|
||||
|
|
Loading…
Reference in a new issue