sudo apt install curl 7zip npm

Node.js — Download Node.js®

mkdir notion && cd notion && \
curl -OL <https://www.notion.com/desktop/windows/download> && \

7z e download '$PLUGINSDIR/app-64.7z' && \
7z e app-64.7z resources/app.asar resources/trayIcon.ico && \
npx -y @electron/[email protected] extract app.asar app ; \

cd app && \
npx -y electron-builder@latest -l AppImage && \

mkdir ~/.local/bin/ ; \
killall -w -I notion ; \
cp dist/Notion-*.AppImage ~/.local/bin/Notion.AppImage && \

mkdir -p ~/.local/share/icons/hicolor/256x256/apps ; \
cp ../trayIcon.ico ~/.local/share/icons/hicolor/256x256/apps/notion.png ; \

cd ../.. && rm -rf notion && \

mkdir ~/.local/share/applications/ ; \
cat > ~/.local/share/applications/Notion.desktop << EOF
[Desktop Entry]
Name=Notion
Exec=$HOME/.local/bin/Notion.AppImage %U
Icon=notion
Type=Application
MimeType=x-scheme-handler/notion;
EOF
update-desktop-database ~/.local/share/applications/
xdg-mime default Notion.desktop x-scheme-handler/notion