1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-08-15 16:38:13 +02:00
dotfiles/opencode/plugin/notify.ts

17 lines
432 B
TypeScript

import type { Plugin } from "@opencode-ai/plugin"
// CONFIGURATION: Set to true to enable this plugin
const ENABLED = true
export const Notify: Plugin = async ({ $ }) => {
// Plugin disabled - set ENABLED = true to activate
if (!ENABLED) return {}
return {
async event(input) {
if (input.event.type === "session.idle") {
await $`notify-send t 10000 "Opencode" "Your code is done!"`
}
},
}
}