资源简介
相信不只是我,用过(或看过)macOS 和 Windows 两个版本 Notion 客户端的同学,应该都会觉得 Windows 上的 Notion 用户「处于水深火热」之中。Notion 的桌面客户端是「网页套壳」的成果,受限于 Windows 上的 Electron API,Notion 官方的 Windows 客户端拥有 Windows 桌面应用的一切特征:
对 Notion 来说没有什么用处的「工具栏」
粗大的 Windows 老式「滚动条」
与 Notion 整体颜色不符的「标题栏」
……
不过 Notion 客户端是用 Electron 封装的,其样式、布局等和网页的定义方法一致。因此我们可以通过一些手段对 Notion 的 Windows 客户端进行定制,使之更符合我们的审美与使用习惯。
对 Notion 来说没有什么用处的「工具栏」
粗大的 Windows 老式「滚动条」
与 Notion 整体颜色不符的「标题栏」
……
不过 Notion 客户端是用 Electron 封装的,其样式、布局等和网页的定义方法一致。因此我们可以通过一些手段对 Notion 的 Windows 客户端进行定制,使之更符合我们的审美与使用习惯。

代码片段和文件信息
“““
# Step 1
1.Locating notion app at ./%Username%/AppData/Local/Programs/Notion
2.Unpacking app.asar in new folder at./Notion/resources/app
3.Renaming file app.asar to app.asar.bak (because instead app won‘t use folder “app“ to get all resources from it)
4.If app.asar already unpacked - it will try to locate folder “app“ and skip to next step
# Step 2
1. Editing userscript file to replace “full_path_to_custom_style“ with full path to ./custom_style.css
2. Adding userscript from main.user.js(should be in same folder with this .py file) to the ./app/renderer/preload.js
3. If there is already userscript - it will overwrite it.
# Step 3
1. Adding property “frame: false“ to the place where application window is creating
# Step 4
1. Changes “window drag“ area to make window draggable
1.1. You can change it by yourself if you experiencing problems with dragging window or with clicking buttons on app topbar
Because this “draggable area“ is creating on top of the other stuff so if it will have button behind it - it won‘t be clickable.
You should change topleftright properties. Now it‘s 2px on top 390px on left and 420px on right;
“““
import os
from time import sleep
from shutil import copyfile
import re
try:
sleepTime = 0.5
sleep(sleepTime)
print(“========= START OF LOG =========“)
sleep(sleepTime)
LOCALAPPDATA = os.getenv(‘LOCALAPPDATA‘)
notionResourcesPath = LOCALAPPDATA + ‘/Programs/Notion/resources‘
windowToggleHotkey = “‘ctrl+shift+a‘“
# Step 1
print(“Step 1“)
sleep(sleepTime)
if os.path.isfile(notionResourcesPath + ‘/app.asar‘):
sleep(sleepTime)
print(“ Unpacking app.asar“)
os.system(“asar extract %LOCALAPPDATA%/Programs/Notion/resources/app.asar %LOCALAPPDATA%/Programs/Notion/resources/app“)
sleep(sleepTime)
renameSource = notionResourcesPath + ‘/app.asar‘
renameDestination = renameSource + ‘.bak‘
os.rename(renameSource renameDestination)
print(“ Renaming asar.app to asar.app.bak“)
sleep(sleepTime)
else:
sleep(sleepTime)
print(“ There is no file at Notion/resources/app.asar“)
sleep(sleepTime)
print(“ Trying to locate unpacked app.asar“)
sleep(sleepTime)
if os.path.exists(notionResourcesPath + ‘/app‘):
print(“ app.asar already unpacked - Moving to the next step“)
sleep(sleepTime)
else:
print(“ Nothing found at Notion/resources/app. Exiting. “)
input(“Press Enter to exit...“)
exit()
print(“-Done-\n“)
sleep(sleepTime)
print(“Step 2“)
sleep(sleepTime)
# Step 2
if os.path.isfile(notionResourcesPath + ‘/app/renderer/preload.js‘):
print(“ Adding userscript to Notion/resources/app/renderer/preload.js“)
sleep(sleepTime)
preload = open(notionResourcesPath + ‘/app/renderer/prel
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-02-13 17:43 Notion Customization\
文件 14559 2020-02-13 17:43 Notion Customization\Customization Patcher.py
文件 3179 2020-02-13 17:43 Notion Customization\Customization Remover.py
目录 0 2020-02-13 17:43 Notion Customization\resources\
文件 5200 2020-02-13 17:49 Notion Customization\resources\custom_st
文件 112696 2020-02-13 17:43 Notion Customization\resources\icon.ico
文件 3440 2020-02-13 17:43 Notion Customization\resources\main.user.js
文件 660 2020-02-13 17:43 Notion Customization\resources\store.js
- 上一篇:人工蜂群优化算法
- 下一篇:电磁信号LMV358放大模块VA
相关资源
- winsock win10 注册表备份文件
- RADMIN 3.4 注册机WIN10可用
- Radmin 3.5 简体中文版附完美破解 支持
- Radmin支持win10
- radmin服务端win10亲测可用,带破解方法
- radmin3.51完美破解版(支持win10)
- lenovo电源管理驱动win10版 v1.67.10.15 官
- SentinelRMSToolkitv2.0.rar
- win10 64位下编译的opencv4.5.5库,opencv
- 串口模拟器支持win10
- 64bit.server2008或win10下安装git服务器
- usb转 串口驱动 ch340 PL2303 win10 可用
- win 10 telnet客户端
- win10最新1903版多用户termsrv.dll文件及修
- Win7/Win10网络适配器驱动 通用版
- codewarrior6.3 win10环境可以安装的破解
- Macbook air superdrive win10 x64驱动
- XTW100编程器Win10驱动安装
- Winflash_Win10_64_VER310
- 联想小新air 13 安装纯净版win10找不到
- esp8266 win10驱动 cp2102
- Win10安装MTK编译环境说明及补丁
- office强力卸载工具win10版V2.10
- win10完美PSD和AI缩略图补丁
- pl2303驱动程序 for win10
- CP2102驱动WIN7、WIN10、32位、64位
- NetMeeting for win10 64位可安装
- FFmpeg 采集摄像头输出rtmp直播流媒体,
- win10 版本万能转换工具
- Primocache3.0.2免PE重置第二版,最新支持
评论
共有 条评论