Detatch Notify

Don't hesitate to post if you have an improvement idea
Post Reply
minx
Posts: 11
Joined: 24 Jan 2021, 20:51

Detatch Notify

Post by minx »

When issuing a notification by Notify, GNU/Linux only, the notification is closed if the Actiona process ends.

Actiona Wiki Notify

I suggest one have an option to .show() a notification, or create a Notify object in «detached mode», or by other manners solve this. Could the notify process be detatched on an eventual exit for example?

Test code notify.js:

Code: Select all

const CMD = Process.thisProcess().command();
var tmp = CMD.split(/ -- (.*)/);
const SLEEP = tmp.length > 1 ? tmp[1] : 0;

var notify = new Notify({
	title: "Test " + (new Date).toISOString(),
	text: "Notification from Actiona\r\nSleep: " + SLEEP,
	timeout: 1000
});
notify.show();
Execution.sleep(SLEEP);
Run as: (GNU/Linux only)

Code: Select all

QT_LOGGING_RULES="*.debug=false" actexec -c -Q notify.js -- <SLEEP_TIME>
Where the optional <SLEEP_TIME> should be seconds for Actiona to sleep before exiting the script.

---

OK. I see now that I should have used System.variable instead of argument - but should work (as long as you do not have a " -- " in the path to the script at least).
Post Reply