change the process title
This commit is contained in:
parent
de541f690d
commit
48db545c78
2 changed files with 2 additions and 1 deletions
1
index.js
1
index.js
|
@ -2,6 +2,7 @@ const render = require('./render');
|
|||
const mpris = require('./mpris');
|
||||
|
||||
async function main() {
|
||||
process.title = 'bouncy';
|
||||
mpris.init(render.error, render.warning, render.info);
|
||||
setInterval(() => {render.render(mpris.getArtist(), mpris.getAlbum(), mpris.getTitle(), mpris.getSongStart(), mpris.getSongEnd(), mpris.getSongPauseSpot(), mpris.getSongPaused())}, render.refreshrate);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ process.stdin.on('keypress', (str, key) => {
|
|||
if (key.sequence === '\x03' || key.sequence === '\x04') process.exit(0); // ctrl+c, ctrl+d
|
||||
});
|
||||
process.on('exit', () => {
|
||||
process.stdout.write('\x1B[?25l\033[0m'); // show cursor
|
||||
process.stdout.write('\x1B[?25h\033[0m'); // show cursor
|
||||
})
|
||||
|
||||
const plas = [' ', '.', '*', '/', '0'];
|
||||
|
|
Loading…
Reference in a new issue