mirror of
https://github.com/Eugeny/tabby
synced 2024-11-15 01:17:14 +00:00
much faster tab closing on macOS
This commit is contained in:
parent
a4ccbfa857
commit
5cb3cef6ce
4 changed files with 17 additions and 0 deletions
|
@ -42,6 +42,7 @@
|
|||
"async-lock": "^1.0.0",
|
||||
"font-manager": "0.3.0",
|
||||
"hterm-umdjs": "1.4.1",
|
||||
"macos-native-processlist": "^1.0.0",
|
||||
"mz": "^2.6.0",
|
||||
"node-pty-tmp": "0.7.2",
|
||||
"ps-node": "^0.1.6",
|
||||
|
|
|
@ -155,6 +155,14 @@ export class Session extends BaseSession {
|
|||
if (!this.truePID) {
|
||||
return []
|
||||
}
|
||||
if (process.platform === 'darwin') {
|
||||
let processes = await require('macos-native-processlist').getProcessList()
|
||||
return processes.filter(x => x.ppid === this.truePID).map(p => ({
|
||||
pid: p.pid,
|
||||
ppid: p.ppid,
|
||||
command: p.name,
|
||||
}))
|
||||
}
|
||||
return new Promise<IChildProcess[]>((resolve, reject) => {
|
||||
psNode.lookup({ ppid: this.truePID }, (err, processes) => {
|
||||
if (err) {
|
||||
|
|
|
@ -58,6 +58,7 @@ module.exports = {
|
|||
'font-manager',
|
||||
'path',
|
||||
'node-pty-tmp',
|
||||
'macos-native-processlist',
|
||||
'mz/fs',
|
||||
'mz/child_process',
|
||||
/^rxjs/,
|
||||
|
|
|
@ -97,6 +97,13 @@ loader-utils@^1.0.2:
|
|||
emojis-list "^2.0.0"
|
||||
json5 "^0.5.0"
|
||||
|
||||
macos-native-processlist@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/macos-native-processlist/-/macos-native-processlist-1.0.0.tgz#1dcf1fac554e057f90c6451c39420e065d186a68"
|
||||
integrity sha512-FYA5DzCBvt+1wcCR8iFoCW2zZ8GZXtR6Ee/kpC9gVlqvEcM2ooma71KV8EIP2VaM+v2HOQAVvNoKSmFBd4z8dQ==
|
||||
dependencies:
|
||||
nan "^2.10.0"
|
||||
|
||||
mz@^2.6.0:
|
||||
version "2.6.0"
|
||||
resolved "https://registry.yarnpkg.com/mz/-/mz-2.6.0.tgz#c8b8521d958df0a4f2768025db69c719ee4ef1ce"
|
||||
|
|
Loading…
Reference in a new issue