Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linux installation #4

Merged
merged 2 commits into from
Jun 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ _note: this is currently an unreleased version of the enhancer, which adds some

## installation

currently, only win10 is supported. it is possible to run this script via the wsl to modify the win10 notion app.
currently, both win10 and Linux are supported. it is possible to run this script via the wsl to modify the win10 notion app.

For Linux install notion from [here](https://github.com/jaredallard/notion-app). Or if you're using arch install [notion-app](https://aur.archlinux.org/packages/notion-app/) package from AUR.

(the [styles](#styling) should also work for the web version.
these can be installed via an extension like [stylus](https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne?hl=en)
Expand All @@ -21,7 +23,7 @@ or a built-in feature like [userChrome.css](https://www.userchrome.org/).)
6. ensure notion is closed.
7. optional: to remove previous applications of the notion enhancer, run `cleaner.py`
8. optional: modify the `resources/user.css` file to your liking (see [styling](#styling)).
9. run `customiser.py` to build changes.
9. run `customiser.py` to build changes. (for linux run with sudo)

done: run notion and enjoy.

Expand Down
9 changes: 9 additions & 0 deletions customiser.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
elif sys.platform == 'win32':
filepath = subprocess.run(['echo', '%localappdata%'], shell=True, capture_output=True).stdout \
.rstrip().decode('utf-8').replace('\\', '/') + '/Programs/Notion/resources'
elif sys.platform == 'linux':
filepath = '/opt/notion-app'
else:
print(' > script not compatible with your os!\n (report this to dragonwocky#8449 on discord)')
exit()
Expand Down Expand Up @@ -197,6 +199,13 @@
print(
f' * {filepath}/app/main/main.js was not found: step skipped.')

if sys.platform == 'linux':
print(f' ...patching app launcher {filepath}/notion-app')
subprocess.call(['sed', '-i', 's/app\.asar/app/', '/usr/bin/notion-app'])
# patch this too just in case
subprocess.call(['sed', '-i', 's/app\.asar/app/', f'{filepath}/notion-app'])


print('\n>>> SUCCESSFULLY CUSTOMISED <<<')

except Exception as e:
Expand Down