作为前段开发者的神器ATOM,个人觉得边框是真的丑,果断下插件进行删除window自带的边框,如图:

1.

图片描述

2.删除边框需要借助三个插件

(1)title-bar-replacer
(2)atom-windows-titlebar
(3)asar

3.首先去atom里面下载好(1)(2),如果不会下载或者点击install没有用。参考

 https://www.v2ex.com/amp/t/369533

4.进入到title-bar-replacer设置:

图片描述

如果你的自带删除window变宽可以删除那就可以忽略下边删除边框

关闭ATOM 打开git或者node 打开自己的路径

1.cd C:\Users\{user}\AppData\Local\atom\app-{version}
2.npm install asar 
3.node toggleframe.js
4.打开ATOM, 看看边框是否被删除了

*.如果发现找不到文件的模块,那就在目录下创建一个toggleframe.js文件,将内容复制进去保存,再运行node toggleframe.js

 `// Setup
    var asar = require('asar')
    var fs = require('fs')
    var appAsarPath = './resources/app.asar'
    var appAsarUnpackedPath = './resources/app.asar.unpacked'
    var atomWindowPath = appAsarUnpackedPath + '/src/main-process/atom-window.js'
    
    console.log('Unpacking ASAR...')
    asar.extractAll(appAsarPath, appAsarUnpackedPath)
    
    fs.readFile(atomWindowPath, 'UTF-8', function(err, contents) {
      // What we are changing
      var changeOff = "if (this.shouldHideTitleBar())"
      var changeOn = "/* (this.shouldHideTitleBar(*/"
    
      // Check if changed before
      var on = contents.indexOf(changeOn) > 0
      console.log('Toggling Frame...' + on)
      on ? fs.writeFile(atomWindowPath, contents.replace(changeOn, changeOff), 'UTF-8', function() {}) :
        fs.writeFile(atomWindowPath, contents.replace(changeOff, changeOn), 'UTF-8', function() {})
    
      console.log('Repacking ASAR...')
      asar.createPackage(appAsarUnpackedPath, appAsarPath, function() {})
    
      console.log('done! Reopen Atom!')
})`   

如果你觉得这篇文章对你有帮助就分享出去吧,让更多喜欢ATOM的程序猿都看到,谢谢


CoolLsk
119 声望11 粉丝

座右铭是树袋熊


引用和评论

0 条评论