资源简介
相信不只是我,用过(或看过)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
相关资源
- CH340G-CH340通用驱动 支持win10/win7 64位驱
- win7win10个人文档转移工具
- win10可用msp430驱动
- win10、win7 MSCOMM控件安装包
- window下CPU型号更改,支持WIN10
- CH340 、USB转串口驱动、Win10 64位,亲测
- Win10不需要Cygwin搭建大数据测试环境搭
- 禁止win10文件夹自动排列.bat
- win8.win10去右下角水印
- win10任务栏全透明的小软件translucent
- PADS VX2.4layout封装向导WIN10显示补丁.
- eclipse中文版支持win1064位.txt
- 显示win10里所有热键的软件
- 解决在WIN10 64或WIN7 WIN8 安装protel99 S
- CH341串口驱动Win10
- 支持win10 的资料转移器-可将我的文档
- win10 telnetserver
- TTF16 6.1.6.2 支持win10 x64.zip
- CH340驱动(USB串口驱动)_XP_WIN7-win10全
- win8win10软件窗口显示不全问题解决
- win10系统可执行pesq.exe
- 超级终端,Win10能用
- 教你在XP系统下如何访问win10共享的打
- win10-64bit-纯净版ISO镜像文件
- FT232RL Windows下驱动 WIN10亲测可用.zip
- TIA V15 地址 win10完美运行
- win10自制桌面时钟代码
- Spy4Win__Win10
- fl2000驱动最新版2.1.33676win10可用usb转
-
ST-li
nk v2官方驱动,win10可用
评论
共有 条评论