├── Notion_app_logo.png ├── .gitignore ├── uninstall.sh ├── config.sh ├── notion ├── LICENSE ├── README.md └── install.sh /Notion_app_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredallard/notion-app/HEAD/Notion_app_logo.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | deps 2 | release 3 | tmp 4 | *.tar.xz 5 | *.tar 6 | pkg 7 | Notion.desktop 8 | .DS_Store 9 | -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rm -rf /opt/notion 4 | rm -r "$HOME/.local/share/applications/Notion.desktop" 5 | rm /usr/bin/notion 6 | -------------------------------------------------------------------------------- /config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Override the version of Electron, by default it detects it from the 4 | # downloaded Notion package. 5 | # ELECTRON_VERSION="" 6 | NOTION_VERSION="3.9.1" 7 | BETTER_SQLITE3_VERSION="9.4.5" 8 | -------------------------------------------------------------------------------- /notion: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Launches notion 3 | 4 | if [[ ! -e "/opt/notion" ]]; then 5 | echo "Error: /opt/notion not found" 6 | exit 1 7 | fi 8 | 9 | cd /opt/notion || exit 1 10 | exec ./electron app.asar 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Jared Allard 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Notion for Linux 2 | 3 | This is a meta repo that contains scripts/stuff needed to build Notion for Linux 4 | 5 | ## Alternatives (based on this repo) 6 | 7 | ### Arch Linux 8 | 9 | [notion-app-electron](https://aur.archlinux.org/packages/notion-app-electron) 10 | 11 | ### Gentoo 12 | 13 | I provide an ebuild in [my overlay](https://github.com/jaredallard/overlay) 14 | 15 | ## How? 16 | 17 | The electron sources are pulled out of the macOS dmg and then ran with a Linux version of Electron, yeah, it's that easy. 18 | 19 | ## Customizing 20 | 21 | Modify `config.sh` before running `build.sh` or `makepkg -si` 22 | 23 | ```bash 24 | NOTION_VERSION=x.x.x notion dmg to download 25 | ``` 26 | 27 | ## Installing 28 | 29 | Ensure you have the dependencies installed: 30 | 31 | * 7zip (7zip on ubuntu) 32 | 33 | Run `sudo ./build.sh [--no-compress]` 34 | 35 | ## Uninstalling 36 | 37 | * Run `sudo ./uninstall.sh` 38 | 39 | Or manually: 40 | 41 | * Delete the application `rm -rf /opt/notion` 42 | * Delete desktop entry `rm -r ~/.local/share/applications/Notion.desktop` 43 | * Delete `rm /usr/bin/notion` 44 | 45 | ## License 46 | 47 | MIT 48 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Installs an extracted version of a notion 3 | # tarball generated by build.sh 4 | set -euo pipefail 5 | 6 | # INSTALL_DIR is the directory where Notion will be installed. 7 | INSTALL_DIR="/opt/notion" 8 | 9 | WORKING_DIR=$(pwd) 10 | 11 | # create_shortcut creates a shortcut for the current user 12 | # to launch Notion from the desktop. 13 | create_shortcut() { 14 | cat <Notion.desktop 15 | [Desktop Entry] 16 | Name=Notion 17 | Name[en_US]=Notion 18 | Comment=Unofficial Notion application for Linux 19 | Exec="/opt/notion/notion" 20 | Terminal=false 21 | Categories=Office;TextEditor;Utility 22 | Type=Application 23 | Icon=${WORKING_DIR}/Notion_app_logo.png 24 | StartupWMClass=notion 25 | EOS 26 | chmod +x Notion.desktop 27 | 28 | # This can be updated if this path is not valid. 29 | cp -p Notion.desktop "$HOME/.local/share/applications" 30 | } 31 | 32 | install_notion() { 33 | if [[ -e "$INSTALL_DIR" ]]; then 34 | echo "Error: $INSTALL_DIR already exists" >&2 35 | exit 1 36 | fi 37 | 38 | topDir="$(dirname "$INSTALL_DIR")" 39 | if [[ ! -w "$topDir" ]]; then 40 | echo "Error: $topDir is not writable. Re-run with sudo?" >&2 41 | exit 1 42 | fi 43 | 44 | mkdir -p "$INSTALL_DIR" 45 | 46 | # Copy all files in the current directory to the install directory. 47 | cp -rvp ./* "$INSTALL_DIR" 48 | 49 | # Install the notion script to /usr/bin/notion 50 | ln -s "$INSTALL_DIR/notion" /usr/bin/notion 51 | } 52 | --------------------------------------------------------------------------------