mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
session: improve title retrieval
This commit is contained in:
parent
4d99089afb
commit
7a6fc8ad8c
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ const { spawn } = require('child_pty');
|
|||
const { exec } = require('child_process');
|
||||
const defaultShell = require('default-shell');
|
||||
|
||||
const TITLE_POLL_INTERVAL = 1000;
|
||||
const TITLE_POLL_INTERVAL = 500;
|
||||
|
||||
module.exports = class Session extends EventEmitter {
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ module.exports = class Session extends EventEmitter {
|
|||
|
||||
// TODO: limit the concurrency of how many processes we run?
|
||||
// TODO: only tested on mac
|
||||
exec(`ps ac | grep ${tty} | tail -n 1`, (err, out) => {
|
||||
exec(`ps uxac | grep ${tty} | head -n 1`, (err, out) => {
|
||||
if (this.ended) return;
|
||||
if (err) return;
|
||||
let title = out.split(' ').pop();
|
||||
|
|
|
|||
Loading…
Reference in a new issue