arodik / macos-focus-mode Goto Github PK
View Code? Open in Web Editor NEWNodeJS library and CLI for managing focus mode on your MacOS
NodeJS library and CLI for managing focus mode on your MacOS
Hi
We added macos-focus-mode
But on running from command line it was throwing error:
macos-focus-mode enable "XXXXX"
Error: There was a problem running the shortcut “macos-focus-mode”.
Command failed: shortcuts run macos-focus-mode <<< on
Would love to use it but I not know about Node.js.
I installed it via npm i macos-focus-mode
to a local folder.
When I execute macos-focus-mode install
the shell dont know the command.
So I navigated to the Bin folder and tried: node cli.js
. But getting this error:
internal/modules/cjs/loader.js:1172
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Applications/node_modules/macos-focus-mode/bin/cli.js
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1172:13)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'ERR_REQUIRE_ESM'
}
NPM: v12.16.2
Thanks for the helpful tooL! However I want to customise the duration to be different to 1 minute:
macos-focus-mode enable -d 60
sets for 1 minute
macos-focus-mode enable -d 1
same as above.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.