mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-29 15:59:54 +00:00
much faster tab closing on macOS
This commit is contained in:
parent
a4ccbfa857
commit
5cb3cef6ce
@ -42,6 +42,7 @@
|
|||||||
"async-lock": "^1.0.0",
|
"async-lock": "^1.0.0",
|
||||||
"font-manager": "0.3.0",
|
"font-manager": "0.3.0",
|
||||||
"hterm-umdjs": "1.4.1",
|
"hterm-umdjs": "1.4.1",
|
||||||
|
"macos-native-processlist": "^1.0.0",
|
||||||
"mz": "^2.6.0",
|
"mz": "^2.6.0",
|
||||||
"node-pty-tmp": "0.7.2",
|
"node-pty-tmp": "0.7.2",
|
||||||
"ps-node": "^0.1.6",
|
"ps-node": "^0.1.6",
|
||||||
|
@ -155,6 +155,14 @@ export class Session extends BaseSession {
|
|||||||
if (!this.truePID) {
|
if (!this.truePID) {
|
||||||
return []
|
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) => {
|
return new Promise<IChildProcess[]>((resolve, reject) => {
|
||||||
psNode.lookup({ ppid: this.truePID }, (err, processes) => {
|
psNode.lookup({ ppid: this.truePID }, (err, processes) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -58,6 +58,7 @@ module.exports = {
|
|||||||
'font-manager',
|
'font-manager',
|
||||||
'path',
|
'path',
|
||||||
'node-pty-tmp',
|
'node-pty-tmp',
|
||||||
|
'macos-native-processlist',
|
||||||
'mz/fs',
|
'mz/fs',
|
||||||
'mz/child_process',
|
'mz/child_process',
|
||||||
/^rxjs/,
|
/^rxjs/,
|
||||||
|
@ -97,6 +97,13 @@ loader-utils@^1.0.2:
|
|||||||
emojis-list "^2.0.0"
|
emojis-list "^2.0.0"
|
||||||
json5 "^0.5.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:
|
mz@^2.6.0:
|
||||||
version "2.6.0"
|
version "2.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/mz/-/mz-2.6.0.tgz#c8b8521d958df0a4f2768025db69c719ee4ef1ce"
|
resolved "https://registry.yarnpkg.com/mz/-/mz-2.6.0.tgz#c8b8521d958df0a4f2768025db69c719ee4ef1ce"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user