中文 | English
Pake
Features
🏂 Small:Nearly 50 times smaller than the Electron shell package, less than 2M.
😂 Fast:Using the Rust Tauri, the performance experience is much lighter and faster than JS.
🩴 Special:Not just packaged, with universal shortcut pass-through, immersive windows, drag-and-drop, packaged style compatibility.
🐶 Toy:Just a very simple little toy, a way to play with Rust instead of the old idea of shelling the web.
Shortcuts
command + ←:Return to the previous pagecommand + →:Go to the next pagecommand + ↑:Auto scroll to top of pagecommand + ↓:Auto scroll to bottom of pagecommand + r:Refresh Pagecommand + w:Hide window, not quite
Effect
WeRead
Download:https://github.com/tw93/Pake/raw/master/download/WeRead.dmg
Flomo
Download:https://github.com/tw93/Pake/raw/master/download/Flomo.dmg
Witeboard
Download:https://github.com/tw93/Pake/raw/master/download/Witeboard.dmg
Download:https://github.com/tw93/Pake/raw/master/download/WhatsApp.dmg
Vercel
Download:https://github.com/tw93/Pake/raw/master/download/Vercel.dmg
Development
Refer to the tauri documentation to quickly configure your environment before you start
// Install Dependencies
npm i
// Local development
npm run dev
// Pack
npm run build
New pack
- Modify the
tauri.conf.jsonin thesrc-tauridirectory to include 4 fieldsproductName, icon, title, identifier, where icon can be downloaded from macosicons and placed in theiconsdirectory. - Change the with_url field in
main.rsin thesrc-tauri/srcdirectory to the address of the page you want to package. npm run devfor local debugging, and open the devtools comments inmain.rs(search for_devtools) for container debugging.npm run buildcan be run to package, if you have devtools mode open, remember to comment it out.
Advanced
How do I rewrite the style, e.g. to remove ads from the original site, or even redesign it?
- first open devtools debug mode, find the name of the style you want to change and verify the effect in devtools first.
- find the location of the style in
main.rs(search forstyle.innerHTML) and add the style you need to override, there are some examples you can copy. - Remember to remove the devtools comments before packaging.
How to inject js code, e.g. to implement event listeners, e.g. keyboard shortcuts?
- Same preparation as in case 1 above.
- refer to the event listener in
main.rs(search fordocument.addEventListener), and write it directly, it's more of a basic front-end technique here.
How to communicate with Pake about events in containers, such as dragging and dropping, scrolling, special clicks on the Web, etc.?
- the same preparation as in 1 above.
- refer to the communication code in
main.rs(search forpostMessage), write the event listener and then usewindow.ipc.postMessageto pass the event and its parameters. - then refer to the container to receive events (search for
window.drag_window) and handle them yourself. for more information, refer to tauri and wry's official documentation.
Finally
- I hope that you will enjoy playing with it and let me know if you have any new ideas.
- If you find a page that would be great for a Mac App, please let me know and I'll add it to the list.





