- onenote.git
- bin
- p3x-onenote.js
This file ( 981B ) exceeds the allowed full mode (48 kb) size.
The editor full hight is disabled, only scrolling is allowed..
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height
mode, although some users like it.
#!/usr/bin/env node
if (!require('fs').existsSync(`${__dirname}/../node_modules`)) {
require('child_process').execSync(`cd ${__dirname}/..; npm install`, {
stdio: 'inherit'
});
}
const utils = require('corifeus-utils');
const path = require('path');
const mz = require('mz');
const start = async() => {
const desktopEntry = `${process.env.HOME}/.local/share/applications/p3x-onenote.desktop`;
const exists = await utils.fs.ensureFile(desktopEntry, `[Desktop Entry]
Version=1.0
Type=Application
Name=P3X Onenote
Icon=${path.resolve(__dirname + '/../src/electron/images/256x256.png')}
Exec=${__filename}
Comment=https://www.patrikx3.com
Categories=Office;
Terminal=false
`)
if (!exists) {
await mz.fs.chmod(desktopEntry , '0755');
await utils.childProcess.exec('gtk-update-icon-cache || true');
}
await utils.childProcess.exec(`${__dirname}/../node_modules/.bin/electron ${__dirname}/../src/electron/app.js`, true);
}
start();