Skip to content

Commit 352e9ab

Browse files
authored
Merge pull request #15 from Mohmn/feat/restart-on-boot
feat: /auto start on boot
2 parents c5c8ae6 + cab6ba2 commit 352e9ab

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dist-ssr
1515
# Editor directories and files
1616
.vscode/*
1717
!.vscode/extensions.json
18+
!.vscode/settings.json
1819
.idea
1920
.DS_Store
2021
*.suo

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
// The number of spaces a tab is equal to. This setting is overridden
3+
// based on the file contents when `editor.detectIndentation` is true.
4+
"editor.tabSize": 2,
5+
// Insert spaces when pressing Tab. This setting is overriden
6+
// based on the file contents when `editor.detectIndentation` is true.
7+
"editor.insertSpaces": false,
8+
// When opening a file, `editor.tabSize` and `editor.insertSpaces`
9+
// will be detected based on the file contents. Set to false to keep
10+
// the values you've explicitly set, above.
11+
"editor.detectIndentation": false
12+
}

src/App.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,18 @@ function App() {
2626
};
2727
const storedTimerObj = localStorage.getItem(LOCALSTORAGEKEYS.LIFESPANOFSCR);
2828
const timerObj = storedTimerObj ? JSON.parse(storedTimerObj) as TIMER : defaultTimerObj;
29-
console.log('timerObk', timerObj);
3029
return timerObj;
3130
});
3231
const [showMsg, setShowMsg] = useState<boolean>(false);
3332

3433
// to start the app automaticall on startup
3534
useLayoutEffect(() => {
3635
(async () => {
37-
await enable()
36+
await enable();
37+
await startListeningForScreenShot(
38+
userScrDir,
39+
convertTimeToMiliSeconds(timerToDelScreenShot.time, timerToDelScreenShot.unit)
40+
);
3841
})()
3942
}, [])
4043

0 commit comments

Comments
 (0)