@timmy6942025/cli-timer 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/package.json +1 -1
- package/src/index.js +3 -3
package/README.md
CHANGED
|
@@ -114,3 +114,5 @@ Controls in settings UI:
|
|
|
114
114
|
- `/`: filter fonts in font picker
|
|
115
115
|
- `/`: filter keys in key picker
|
|
116
116
|
- `Esc`/`q`: back/cancel
|
|
117
|
+
|
|
118
|
+
Note for macOS: If system notifications are inconsistent with built-in AppleScript notifications, install `terminal-notifier` (`brew install terminal-notifier`) for improved reliability.
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -490,11 +490,11 @@ function sendSystemNotification({ title, message }) {
|
|
|
490
490
|
|
|
491
491
|
try {
|
|
492
492
|
if (process.platform === "darwin") {
|
|
493
|
-
|
|
494
|
-
if (spawnOk("osascript", ["-e", script])) {
|
|
493
|
+
if (spawnOk("terminal-notifier", ["-title", safeTitle, "-message", safeMessage])) {
|
|
495
494
|
return true;
|
|
496
495
|
}
|
|
497
|
-
|
|
496
|
+
const script = `display notification "${escapeAppleScriptString(safeMessage)}" with title "${escapeAppleScriptString(safeTitle)}"`;
|
|
497
|
+
if (spawnOk("osascript", ["-e", script])) {
|
|
498
498
|
return true;
|
|
499
499
|
}
|
|
500
500
|
return false;
|