OpenCode plugin for desktop notifications via notify-send. Get notified when OpenCode needs approval or is waiting for input.
npm install opencode-hypr-notifierDesktop notifications for OpenCode via notify-send.
Option 1: npm (recommended)
Add to your opencode.json:
``json`
{
"plugin": ["opencode-hypr-notifier"]
}
Option 2: Local file
`bash`
cp src/hypr-notifier.ts ~/.config/opencode/plugin/
- notify-send - Install via apt install libnotify-bin or pacman -S libnotify
- A notification daemon (dunst, mako, swaync, etc.)
| Event | When | Urgency |
|-------|------|---------|
| permission.updated | OpenCode needs approval | Critical |session.idle
| | Waiting for your input | Normal |
Only one idle notification per waiting period (no spam).
Create ~/.config/opencode/opencode-hyprland.json:
`json`
{
"notification": true,
"timeout": 15000,
"urgency": { "permission": "critical", "idle": "normal" },
"icons": { "permission": "dialog-password", "idle": "dialog-information" }
}
| Option | Default | Description |
|--------|---------|-------------|
| notification | true | Enable/disable |timeout
| | 15000 | Display time in ms |transient
| | false | Don't persist in notification history |urgency.*
| | varies | "low", "normal", or "critical"` |
MIT