V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
plqws
V2EX  ›  分享创造

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

  •  
  •   plqws ·
    wspl · 2015-08-19 10:17:20 +08:00 · 3443 次点击
    这是一个创建于 3190 天前的主题,其中的信息可能已经有所发展或是发生改变。

    作为 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 条回复    2015-08-19 12:43:04 +08:00
    w88975
        1
    w88975  
       2015-08-19 11:08:58 +08:00
    我想问,这是 windows 下的吗?
    plqws
        2
    plqws  
    OP
       2015-08-19 12:43:04 +08:00
    @w88975 可以说是全平台吧,不过只能自动识别 Windows 下的 Atom 位置,因为是从注册表弄到的。其他平台要用 `locate` 指令来自己定位 Atom
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1025 人在线   最高记录 6547   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 20:02 · PVG 04:02 · LAX 13:02 · JFK 16:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.