A script for modifing the web-preferences(or chrome://flags) of your atom-editor via commandline.
As is well known, atom-editor cannot modify any flags option in all released versions. But there must be a lot of developers want to trim some options to ensure that atom can work better. For instance, if I intend to enable the MacType (a font-beautify plugin under Windows), I have to disable the direct-write
option so that MacType can works normally.
Developed by node.js via ES6/Babel and working at command line.
It was based on atom/asar project. First, extract the core asar file of atom to a temporary directory. Then modifing the web-preferences options in /src/browser/atom-window.js
according to the user's command. Finally, it will repack a new asar file and overwrite the origin file. (A buckup made at the same time)
// Install git/node/npm first
git clone https://github.com/wspl/atom-flags.git
cd atom-flags
npm install
npm install -g babel-cli
npm install babel-preset-es2015
babel-node --presets es2015 ./lib/main.js
In General, it will search the atom editor automatically for Windows users. If you are linux or OS X user, you should use the command "locate <path-to-app.asar>".
Get a value by flag name.
Set the value of flag or create a new flag with value.
Remove a flag.
Show all flags.
Set a new location of app.asar
file.
Save the app.asar
.
Apache-2.0