From de541f690d6c370d529e4087c08033f25b572c69 Mon Sep 17 00:00:00 2001 From: jill Date: Fri, 3 Sep 2021 07:05:27 +0300 Subject: [PATCH] also reset color --- readme.md | 8 ++++++-- render.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index e50d10b..8f35d22 100644 --- a/readme.md +++ b/readme.md @@ -11,8 +11,12 @@ bouncy is a tiny script that hooks onto mpris to read your currently listening s - a machine running dbus and mpris (typically linux) - nodejs >=14 -## how-to +## how-to install `npm install` and `node index.js` -the music player string defaults to `org.mpris.MediaPlayer2.rhythmbox`, however you can use the `BOUNCY_MUSICPLAYER` environment value to change it to another music player name \ No newline at end of file +the music player string defaults to `org.mpris.MediaPlayer2.rhythmbox`, however you can use the `BOUNCY_MUSICPLAYER` environment value to change it to another music player name + +## usage + +press space to switch between modes \ No newline at end of file diff --git a/render.js b/render.js index 46c1bf1..78568a9 100644 --- a/render.js +++ b/render.js @@ -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'); // show cursor + process.stdout.write('\x1B[?25l\033[0m'); // show cursor }) const plas = [' ', '.', '*', '/', '0'];