this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ps-list → pgrep

+6 -18
+6 -4
index.js
··· 2 2 import os from 'node:os'; 3 3 import {promisify} from 'node:util'; 4 4 import bplist from 'bplist-parser'; 5 - import psList from 'ps-list'; 6 5 import {runAppleScript} from 'run-applescript'; 7 6 8 7 const execute = promisify(execFile); ··· 42 41 * @returns {Promise<boolean>} - Whether Terminal is currently running 43 42 */ 44 43 export async function isTerminalRunning() { 45 - const processes = await psList(); 46 - 47 - return processes.some((process) => process.name === 'Terminal'); 44 + try { 45 + await execute('pgrep', ['-x', 'Terminal']); 46 + return true; 47 + } catch { 48 + return false; 49 + } 48 50 } 49 51 50 52 /**
-13
package-lock.json
··· 13 13 ], 14 14 "dependencies": { 15 15 "bplist-parser": "^0.3.2", 16 - "ps-list": "^9.0.0", 17 16 "run-applescript": "^7.0.0" 18 17 }, 19 18 "devDependencies": { ··· 5775 5774 "loose-envify": "^1.4.0", 5776 5775 "object-assign": "^4.1.1", 5777 5776 "react-is": "^16.13.1" 5778 - } 5779 - }, 5780 - "node_modules/ps-list": { 5781 - "version": "9.0.0", 5782 - "resolved": "https://registry.npmjs.org/ps-list/-/ps-list-9.0.0.tgz", 5783 - "integrity": "sha512-lxMEoIL/BQlk2KunFzxwUPwMvjFH7x7cmvzSLsSHpyMXl9FFfLUlfKrYwFc4wx/ZaIxxuXC4n8rjQ1CX/tkXVQ==", 5784 - "license": "MIT", 5785 - "engines": { 5786 - "node": ">=20" 5787 - }, 5788 - "funding": { 5789 - "url": "https://github.com/sponsors/sindresorhus" 5790 5777 } 5791 5778 }, 5792 5779 "node_modules/punycode": {
-1
package.json
··· 28 28 }, 29 29 "dependencies": { 30 30 "bplist-parser": "^0.3.2", 31 - "ps-list": "^9.0.0", 32 31 "run-applescript": "^7.0.0" 33 32 }, 34 33 "devDependencies": {