It seems like it's not currently possible to get replies to notifications on Ubuntu at the moment. It would be awesome if I could! Same for buttons on Linux notifs.
#!/usr/bin/env node
import {execa} from 'execa';
import {Notification} from 'node-notifier';
const jrnl = (...args) => execa("jrnl", args);
(async () => {
const desiredFrequency = "1 minute"
const recentEntries = (await jrnl(`-from "${desiredFrequency} ago"`)).stdout;
if (recentEntries != "") {
console.log(`jrnl has entries within the last ${desiredFrequency}`);
return;
}
Notification().notify({
title: "jrnl reminder",
message: "You haven't added a jrnl entry in a while. Write one now?",
closeLabel: "Not now",
reply: true,
wait: true,
timeout: 60
},
function (err, response, metadata) {
jrnl(response);
}
);
})();
It seems like it's not currently possible to get replies to notifications on Ubuntu at the moment. It would be awesome if I could! Same for buttons on Linux notifs.
Missing reply box, and custom button text.
Example notification with a button: