mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
12 lines
283 B
TypeScript
12 lines
283 B
TypeScript
import psList from "ps-list";
|
|
import { tasklist } from "tasklist";
|
|
|
|
export const getProcesses = async () => {
|
|
if (process.platform === "win32") {
|
|
return tasklist().then((tasks) =>
|
|
tasks.map((task) => ({ ...task, name: task.imageName }))
|
|
);
|
|
}
|
|
|
|
return psList();
|
|
};
|