Skip to content

Commit

Permalink
feat: adding app autostart on operating system login
Browse files Browse the repository at this point in the history
  • Loading branch information
ailtonloures committed Sep 16, 2024
1 parent 3133d9a commit 5515234
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ VSCode Bookmark
### Requirements

- [Git](https://git-scm.com/)
- [NodeJs v20.*](https://nodejs.org/pt)
- [Node LTS](https://nodejs.org/pt)

### How to use

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-bookmark",
"productName": "VSCode Bookmark",
"description": "A utility to save your favorite projects and open them easily in vscode.",
"version": "1.0.1",
"version": "1.0.2",
"author": "Ailton Loures",
"homepage": "https://github.com/ailtonloures/vscode-bookmark#readme",
"repository": {
Expand Down
8 changes: 6 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ import squirrelStartup from 'electron-squirrel-startup';
import { app } from 'electron/main';
import { renderTray } from './tray.js';

if (squirrelStartup || !app.requestSingleInstanceLock()) app.quit();

Sentry.init({
dsn: 'https://713782327975276ae010040b1db6ab8a@o4507887084503040.ingest.us.sentry.io/4507887098724352',
});

if (squirrelStartup || !app.requestSingleInstanceLock()) app.quit();

app.setLoginItemSettings({
openAtLogin: true,
});

app.whenReady().then(() => renderTray());

0 comments on commit 5515234

Please sign in to comment.