From a36c6246015b9e666255687f60b0f01bb3248ed9 Mon Sep 17 00:00:00 2001 From: leukipp Date: Wed, 9 Jul 2025 20:20:07 +0200 Subject: [PATCH] ref: show version info --- index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 8bee65a..17709cb 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,7 @@ const { app } = require("electron"); global.ARGS = global.ARGS || {}; if (!process.env.DISPLAY) { - console.error(`\n$DISPLAY variable not set to run the GUI application, are you connected via SSH?`); + console.error(`\n$DISPLAY variable not set to run the GUI application, are you connected via SSH?\n`); console.error(`If you have installed the service use:`); console.error(` systemctl --user start touchkio.service`); console.error(`Alternatively export the variables first:`); @@ -34,6 +34,12 @@ app.whenReady().then(async () => { let argsFilePath = path.join(app.getPath("userData"), "Arguments.json"); let argsFileExists = fs.existsSync(argsFilePath); + // Show version and release info + if ("help" in args || "version" in args) { + console.log(`${app.getName()}-v${app.getVersion()}, https://github.com/leukipp/touchkio`); + return app.quit(); + } + // Setup arguments from file path if ("setup" in args || (!argsProvided && !argsFileExists)) { await sleep(3000);