mirror of
https://github.com/yannbertrand/macos-defaults
synced 2024-12-14 21:52:33 +00:00
.. | ||
autohide-delay | ||
autohide-time-modifier | ||
mineffect | ||
orientation | ||
show-recents | ||
tilesize | ||
readme.js |
const MacRunner = require('../mac-runner') const { compressPngImage } = require('../utils') module.exports = { run: async (outputPath) => { console.log('> Recording dock readme screenshot') try { const { screenWidth, screenHeight } = MacRunner.getScreenSize() const dockHeight = MacRunner.getDockHeight() const runner = new MacRunner() await runner .captureScreenRect( 0, screenHeight - dockHeight, screenWidth, dockHeight, `${outputPath}/dock-tmp.png`, ) .run() } catch (runnerError) { throw new Error(runnerError) } try { await compressPngImage(`${outputPath}/dock-tmp.png`, outputPath, 'dock') } catch (compressPngImageError) { throw new Error(compressPngImageError) } return { filepath: `${outputPath}/dock` } }, }