爱意满满的作品展示区。
plqws

写了个 Atom 编辑器中 chrome://flags 设置的 CLI 版本

  •  
  •   plqws ·
    wspl · Aug 19, 2015 · 4006 views
    This topic created in 3999 days ago, the information mentioned may be changed or developed.

    作为 MacType 依赖症晚期的我来说无论什么软件都必须把字体美化一下。

    然后之前我发现了在 Atom 下开启 MacType 的方法: https://www.v2ex.com/t/209293

    不过每次都要用 Hex 编辑器而且 UltraEdit 试用期也快到了,近期 Atom 更新又有点频繁,所以我就琢摸着自己写一个更方便地进行修改的脚本。

    这里感谢一下简书用户:@bitrat 在我简书文章的评论中提到了 atom/asar 项目间接地帮助我完成了这个项目。

    当然,这个工具不仅仅只能够修改字体渲染相关的,它还能修改其他一些提高 Chromium GPU 渲染性能的选项,具体的还是参考 Chromium 官方文档吧。

    项目代码基于 Node.js / ES6 (Babel ),已包含转译引用。

    Github 地址: https://github.com/wspl/atom-flags

    安装方法:

    // Install git/node/npm first
    git clone https://github.com/wspl/atom-flags.git
    cd atom-flags
    npm install
    npm start
    

    使用方法:

    get <key>

    Get a value by flag name.

    set <key> <value>

    Set the value of flag or create a new flag with value.

    del <key>

    Remove a flag.

    list

    Show all flags.

    locate <path-to-app.asar>

    Set a new location of app.asar file.

    save

    Save the app.asar.

    当然同时欢迎大家贡献代码,帮我完善这个小工具。
    不过还是希望 Atom 官方推出 flags 修改的功能,会方便许多哦。

    2 replies    2015-08-19 12:43:04 +08:00
    w88975
        1
    w88975  
       Aug 19, 2015
    我想问,这是 windows 下的吗?
    plqws
        2
    plqws  
    OP
       Aug 19, 2015
    @w88975 可以说是全平台吧,不过只能自动识别 Windows 下的 Atom 位置,因为是从注册表弄到的。其他平台要用 `locate` 指令来自己定位 Atom
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2506 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 00:36 · PVG 08:36 · LAX 17:36 · JFK 20:36
    ♥ Do have faith in what you're doing.