diff --git a/src/background/background.js b/src/background/background.js index 6c6c85c..6787025 100644 --- a/src/background/background.js +++ b/src/background/background.js @@ -317,4 +317,20 @@ app.on('before-quit', () => { app.isQuiting = true if (sphinx) stop() -}) \ No newline at end of file +}) + +var rl = require("readline").createInterface({ + input: process.stdin, + output: process.stdout +}); + +rl.on("SIGINT", function () { + process.emit("SIGINT"); +}); + +process.on("SIGINT", () => { + if (sphinx) + stop() + else + app.quit() +});