@mohak34/opencode-notifier 0.1.27-beta.2 → 0.1.28

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 CHANGED
@@ -55,6 +55,9 @@ Create `~/.config/opencode/opencode-notifier.json` with the defaults:
55
55
  "showSessionTitle": false,
56
56
  "showIcon": true,
57
57
  "notificationSystem": "osascript",
58
+ "linux": {
59
+ "grouping": false
60
+ },
58
61
  "command": {
59
62
  "enabled": false,
60
63
  "path": "/path/to/command",
@@ -115,6 +118,7 @@ Create `~/.config/opencode/opencode-notifier.json` with the defaults:
115
118
  - `showSessionTitle` - Include the session title in notification messages via `{sessionTitle}` placeholder (default: true)
116
119
  - `showIcon` - Show OpenCode icon, Windows/Linux only (default: true)
117
120
  - `notificationSystem` - macOS only: `"osascript"` or `"node-notifier"` (default: "osascript")
121
+ - `linux.grouping` - Linux only: replace notifications in-place instead of stacking (default: false). Requires `notify-send` 0.8+
118
122
 
119
123
  ### Events
120
124
 
@@ -263,6 +267,24 @@ Run your own script when something happens. Use `{event}`, `{message}`, and `{se
263
267
 
264
268
  **NOTE:** If you go with node-notifier and start missing notifications, just switch back or remove the option from the config. Users have reported issues with using node-notifier for receiving only sounds and no notification popups.
265
269
 
270
+ ## Linux: Notification Grouping
271
+
272
+ By default, each notification appears as a separate entry. During active sessions this can create noise when multiple events fire quickly (e.g. permission + complete + question).
273
+
274
+ Enable grouping to replace notifications in-place instead of stacking:
275
+
276
+ ```json
277
+ {
278
+ "linux": {
279
+ "grouping": true
280
+ }
281
+ }
282
+ ```
283
+
284
+ With grouping enabled, each new notification replaces the previous one so you only see the latest event. This requires `notify-send` 0.8+ (standard on Ubuntu 22.04+, Debian 12+, Fedora 36+, Arch). On older systems it falls back to the default stacking behavior automatically.
285
+
286
+ Works with all major notification daemons (GNOME, dunst, mako, swaync, etc.) on both X11 and Wayland.
287
+
266
288
  ## Updating
267
289
 
268
290
  If Opencode does not update the plugin or there is an issue with the cache version:
package/dist/index.js CHANGED
@@ -3747,7 +3747,7 @@ var DEFAULT_CONFIG = {
3747
3747
  showIcon: true,
3748
3748
  notificationSystem: "osascript",
3749
3749
  linux: {
3750
- grouping: true
3750
+ grouping: false
3751
3751
  },
3752
3752
  command: {
3753
3753
  enabled: false,
@@ -3975,7 +3975,6 @@ function sendLinuxNotificationDirect(title, message, timeout, iconPath, grouping
3975
3975
  args.push("--icon", iconPath);
3976
3976
  }
3977
3977
  args.push("--expire-time", String(timeout * 1000));
3978
- args.push("--app-name", "OpenCode");
3979
3978
  if (grouping && lastLinuxNotificationId !== null) {
3980
3979
  args.push("--replace-id", String(lastLinuxNotificationId));
3981
3980
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohak34/opencode-notifier",
3
- "version": "0.1.27-beta.2",
3
+ "version": "0.1.28",
4
4
  "description": "OpenCode plugin that sends system notifications and plays sounds when permission is needed, generation completes, or errors occur",
5
5
  "author": "mohak34",
6
6
  "license": "MIT",