opencode-probleemwijken 1.0.0 → 1.0.1

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.
Files changed (3) hide show
  1. package/README.md +33 -28
  2. package/dist/index.js +7 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,45 +4,30 @@ OpenCode plugin dat een willekeurig geluid afspeelt van de legendarische [Proble
4
4
 
5
5
  ## Installatie
6
6
 
7
- ### Optie 1: Lokale plugin (aanbevolen)
7
+ Voeg de plugin toe aan je `opencode.json`:
8
8
 
9
- 1. Kopieer `plugin.ts` naar je OpenCode plugins directory:
10
-
11
- ```bash
12
- cp plugin.ts ~/.config/opencode/plugins/probleemwijken.ts
9
+ ```json
10
+ {
11
+ "plugin": ["opencode-probleemwijken@latest"]
12
+ }
13
13
  ```
14
14
 
15
- 2. Kopieer de sounds naar je config directory:
16
-
17
- ```bash
18
- mkdir -p ~/.config/opencode/sounds/random-soundboard
19
- cp sounds/*.mp3 ~/.config/opencode/sounds/random-soundboard/
20
- ```
15
+ Herstart OpenCode en je bent klaar!
21
16
 
22
- 3. Zorg dat je `@opencode-ai/plugin` hebt in `~/.config/opencode/package.json`:
17
+ ### Specifieke versie
23
18
 
24
19
  ```json
25
20
  {
26
- "dependencies": {
27
- "@opencode-ai/plugin": "^1.0.0"
28
- }
21
+ "plugin": ["opencode-probleemwijken@1.0.0"]
29
22
  }
30
23
  ```
31
24
 
32
- 4. Herstart OpenCode
33
-
34
- ### Optie 2: Eigen geluiden toevoegen
35
-
36
- Je kunt ook je eigen MP3/WAV/OGG/M4A bestanden toevoegen aan de `~/.config/opencode/sounds/random-soundboard/` directory.
37
-
38
25
  ## Wat doet het?
39
26
 
40
- Elke keer als OpenCode klaar is met een taak (session.idle) of een error krijgt (session.error), speelt de plugin een willekeurig geluid af uit de collectie.
27
+ Elke keer als OpenCode klaar is met een taak (`session.idle`) of een error krijgt (`session.error`), speelt de plugin een willekeurig geluid af uit de collectie van 36 klassieke Derkolk soundboard fragmenten.
41
28
 
42
29
  ## Geluiden
43
30
 
44
- De plugin bevat 36 klassieke Derkolk soundboard fragmenten:
45
-
46
31
  - "VLIEG!"
47
32
  - "Half elf"
48
33
  - "Boertje!?"
@@ -51,13 +36,33 @@ De plugin bevat 36 klassieke Derkolk soundboard fragmenten:
51
36
  - "Koffie"
52
37
  - "Pitbull"
53
38
  - "Tetete"
54
- - ... en nog veel meer!
39
+ - "Kakwijk"
40
+ - "Doei Henk"
41
+ - ... en nog 26 meer!
55
42
 
56
43
  ## Platform ondersteuning
57
44
 
58
- - **macOS**: Gebruikt `afplay` (ingebouwd)
59
- - **Linux**: Gebruikt `mpv` of `ffplay`
60
- - **Windows**: Gebruikt Windows Media Player via PowerShell
45
+ | Platform | Audio player |
46
+ |----------|--------------|
47
+ | macOS | `afplay` (ingebouwd) |
48
+ | Linux | `mpv` of `ffplay` |
49
+ | Windows | Windows Media Player via PowerShell |
50
+
51
+ ## Configuratie (optioneel)
52
+
53
+ Maak `~/.config/opencode/probleemwijken.json` om events aan/uit te zetten:
54
+
55
+ ```json
56
+ {
57
+ "enabled": true,
58
+ "events": {
59
+ "complete": true,
60
+ "subagent_complete": false,
61
+ "error": true,
62
+ "permission": false
63
+ }
64
+ }
65
+ ```
61
66
 
62
67
  ## Credits
63
68
 
package/dist/index.js CHANGED
@@ -105,12 +105,18 @@ async function runCommand(command, args) {
105
105
  });
106
106
  }
107
107
  async function playOnLinux(soundPath) {
108
- const players = [
108
+ const ext = extname(soundPath).toLowerCase();
109
+ const isWav = ext === ".wav";
110
+ const universalPlayers = [
109
111
  { command: "mpv", args: ["--no-video", "--no-terminal", soundPath] },
110
112
  { command: "ffplay", args: ["-nodisp", "-autoexit", "-loglevel", "quiet", soundPath] },
113
+ { command: "cvlc", args: ["--play-and-exit", "--no-video", "-q", soundPath] }
114
+ ];
115
+ const wavOnlyPlayers = [
111
116
  { command: "paplay", args: [soundPath] },
112
117
  { command: "aplay", args: [soundPath] }
113
118
  ];
119
+ const players = isWav ? [...universalPlayers, ...wavOnlyPlayers] : universalPlayers;
114
120
  for (const player of players) {
115
121
  try {
116
122
  await runCommand(player.command, player.args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-probleemwijken",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "OpenCode plugin that plays a random Probleemwijken/Derkolk soundboard sound when a session completes",
5
5
  "author": "Daan-Friday",
6
6
  "license": "MIT",