Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit 5431c04

Browse files
committed
✨ Add "excludeSelfFromToplist" option
Exclude eDEX-related processes from the process monitoring.
1 parent b69f348 commit 5431c04

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/classes/toplist.class.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ class Toplist {
1818
}
1919
updateList() {
2020
window.si.processes().then(data => {
21+
if (window.settings.excludeSelfFromToplist === true) {
22+
data.list = data.list.filter(proc => {
23+
if (proc.name.startsWith("eDEX-UI")) return false;
24+
if (proc.name === "electron" && proc.command.includes("edex-ui")) return false;
25+
return true;
26+
});
27+
}
28+
2129
let list = data.list.sort((a, b) => {
2230
return ((b.pcpu-a.pcpu)*100 + b.pmem-a.pmem);
2331
}).splice(0, 5);

0 commit comments

Comments
 (0)