ATOM如何删除window边框,并且自定义样式
作为前段开发者的神器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的程序猿都看到,谢谢
相关推荐
Yuezhilv 2020-04-25
85221348 2020-02-09
82274551 2020-01-08
ciscoccie00 2019-12-19
hahahd0 2019-03-29
upholdjx 2017-04-05
zhuchenghaoma 2012-02-07
ciscoccie00 2010-02-10
heimeiyingwang 2015-07-28
zhuchenghaoma 2013-08-27
zhujuyu 2019-06-28
永不妥协 2019-06-28
永不妥协 2019-06-27
ciscoccie00 2019-06-27
tenvainvi 2019-06-27
永不妥协 2019-06-27
hahahd0 2019-06-27
Yuezhilv 2019-06-27