Skip to content

Commit

Permalink
Ignore windows lock screen (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
ambarvm authored Jan 5, 2022
1 parent 5b60f99 commit feb9d3a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions packages/desktop/electron/ignorelist.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const ignoreList = [
/[A-Z]:\\Windows\\SystemApps\\Microsoft\.LockApp_[a-z0-9]+\\LockApp\.exe/,
];
5 changes: 5 additions & 0 deletions packages/desktop/electron/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { JSONStorage } from './storage/json.js';
import { ServerStorage } from './storage/server.js';
import { ActiveWindowWatcher } from './watchers/active-window.js';
import getIcon from './getIcon.js';
import { ignoreList } from './ignorelist.js';

export function startTracker() {
const interval = 2000;
Expand All @@ -12,6 +13,10 @@ export function startTracker() {
];

const activeWindowWatcher = new ActiveWindowWatcher(interval, activity => {
if (ignoreList.some(regex => regex.test(activity.path))) {
return;
}

for (const storage of storages) {
storage.saveActivity(activity);
}
Expand Down
6 changes: 0 additions & 6 deletions packages/server/scripts/postbabel.js

This file was deleted.

0 comments on commit feb9d3a

Please sign in to comment.