opencode-probleemwijken 1.6.0 → 1.8.0
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 +30 -0
- package/dist/index.js +34 -5
- package/package.json +1 -1
- /package/sounds/{1-108.mp3 → gen-z/1-108.mp3} +0 -0
- /package/sounds/{Bulldog hap.mp3 → gen-z/Bulldog hap.mp3} +0 -0
- /package/sounds/{Bulldog level spicy.mp3 → gen-z/Bulldog level spicy.mp3} +0 -0
- /package/sounds/{Eem over de tong heen.mp3 → gen-z/Eem over de tong heen.mp3} +0 -0
- /package/sounds/{Huigje tik.mp3 → gen-z/Huigje tik.mp3} +0 -0
- /package/sounds/{Ik ga dood.mp3 → gen-z/Ik ga dood.mp3} +0 -0
- /package/sounds/{Ik wil dit helemaal niet.mp3 → gen-z/Ik wil dit helemaal niet.mp3} +0 -0
- /package/sounds/{Nou komt ie wel.mp3 → gen-z/Nou komt ie wel.mp3} +0 -0
- /package/sounds/{Nu ben ik ook los.mp3 → gen-z/Nu ben ik ook los.mp3} +0 -0
- /package/sounds/{Teleurgesteld.mp3 → gen-z/Teleurgesteld.mp3} +0 -0
- /package/sounds/{adriaantje-teringlijer.mp3 → gen-z/adriaantje-teringlijer.mp3} +0 -0
- /package/sounds/{alweer-een-winnaar.mp3 → gen-z/alweer-een-winnaar.mp3} +0 -0
- /package/sounds/{anime-wow-sound-effect.mp3 → gen-z/anime-wow-sound-effect.mp3} +0 -0
- /package/sounds/{applepay.mp3 → gen-z/applepay.mp3} +0 -0
- /package/sounds/{bankzitters-fart.mp3 → gen-z/bankzitters-fart.mp3} +0 -0
- /package/sounds/{buruman-zooi.mp3 → gen-z/buruman-zooi.mp3} +0 -0
- /package/sounds/{buurman-en-buurman-deuntje.mp3 → gen-z/buurman-en-buurman-deuntje.mp3} +0 -0
- /package/sounds/{buurman-heb-je-nou.mp3 → gen-z/buurman-heb-je-nou.mp3} +0 -0
- /package/sounds/{dun-dun-dun-sound-effect-brass_8nFBccR.mp3 → gen-z/dun-dun-dun-sound-effect-brass_8nFBccR.mp3} +0 -0
- /package/sounds/{faaaa.mp3 → gen-z/faaaa.mp3} +0 -0
- /package/sounds/{gopgopgop.mp3 → gen-z/gopgopgop.mp3} +0 -0
- /package/sounds/{ik-hou-van-potlood.mp3 → gen-z/ik-hou-van-potlood.mp3} +0 -0
- /package/sounds/{kermis-geluiden-2013-0s-5s-96-xoeervpgnuo-mp3cut.mp3 → gen-z/kermis-geluiden-2013-0s-5s-96-xoeervpgnuo-mp3cut.mp3} +0 -0
- /package/sounds/{man-snoring-meme_ctrllNn.mp3 → gen-z/man-snoring-meme_ctrllNn.mp3} +0 -0
- /package/sounds/{metal-gear-alert-sound-effect_XKoHReZ.mp3 → gen-z/metal-gear-alert-sound-effect_XKoHReZ.mp3} +0 -0
- /package/sounds/{musica-elevador-short.mp3 → gen-z/musica-elevador-short.mp3} +0 -0
- /package/sounds/{mwoah.mp3 → gen-z/mwoah.mp3} +0 -0
- /package/sounds/{nederlands-luchtalarm.mp3 → gen-z/nederlands-luchtalarm.mp3} +0 -0
- /package/sounds/{spongebob-fail.mp3 → gen-z/spongebob-fail.mp3} +0 -0
- /package/sounds/{tf_nemesis.mp3 → gen-z/tf_nemesis.mp3} +0 -0
- /package/sounds/{toef-toef-toef-toef.mp3 → gen-z/toef-toef-toef-toef.mp3} +0 -0
- /package/sounds/{tu-tu-tu-du-max-verstappen.mp3 → gen-z/tu-tu-tu-du-max-verstappen.mp3} +0 -0
- /package/sounds/{tuco-get-out.mp3 → gen-z/tuco-get-out.mp3} +0 -0
- /package/sounds/{undertakers-bell_2UwFCIe.mp3 → gen-z/undertakers-bell_2UwFCIe.mp3} +0 -0
- /package/sounds/{wide-putin-meme.mp3 → gen-z/wide-putin-meme.mp3} +0 -0
- /package/sounds/{zit-je-nou-te-poepen-oma-griet.mp3 → gen-z/zit-je-nou-te-poepen-oma-griet.mp3} +0 -0
package/README.md
CHANGED
|
@@ -58,7 +58,9 @@ Maak `~/.config/opencode/probleemwijken.json`:
|
|
|
58
58
|
{
|
|
59
59
|
"enabled": true,
|
|
60
60
|
"includeBundledSounds": true,
|
|
61
|
+
"includeGenZSounds": true,
|
|
61
62
|
"customSoundsDir": null,
|
|
63
|
+
"disabledSounds": [],
|
|
62
64
|
"notifications": {
|
|
63
65
|
"enabled": true,
|
|
64
66
|
"timeout": 5
|
|
@@ -84,7 +86,9 @@ Maak `~/.config/opencode/probleemwijken.json`:
|
|
|
84
86
|
|-------|------|---------|--------------|
|
|
85
87
|
| `enabled` | boolean | `true` | Plugin aan/uit |
|
|
86
88
|
| `includeBundledSounds` | boolean | `true` | Probleemwijken geluiden gebruiken |
|
|
89
|
+
| `includeGenZSounds` | boolean | `true` | Gen Z geluiden gebruiken |
|
|
87
90
|
| `customSoundsDir` | string | `null` | Pad naar folder met eigen geluiden |
|
|
91
|
+
| `disabledSounds` | string[] | `[]` | Specifieke geluiden uitschakelen op naam of pad |
|
|
88
92
|
| `notifications.enabled` | boolean | `true` | Notificaties aan/uit |
|
|
89
93
|
| `notifications.timeout` | number | `5` | Notificatie timeout in seconden (Linux) |
|
|
90
94
|
|
|
@@ -136,6 +140,32 @@ Of simpelweg een boolean voor beide:
|
|
|
136
140
|
|
|
137
141
|
De plugin kiest dan random uit zowel de Probleemwijken geluiden als je eigen geluiden.
|
|
138
142
|
|
|
143
|
+
### Gen Z geluiden uitschakelen
|
|
144
|
+
|
|
145
|
+
De 36 Gen Z geluiden (toegevoegd in v1.6) zitten in een aparte `sounds/gen-z/` folder en kunnen in zijn geheel worden uitgeschakeld:
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"includeGenZSounds": false
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Specifieke geluiden uitschakelen
|
|
154
|
+
|
|
155
|
+
Je kunt specifieke geluiden uitschakelen op bestandsnaam of volledig pad:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"disabledSounds": [
|
|
160
|
+
"koffie.mp3",
|
|
161
|
+
"narcist.mp3",
|
|
162
|
+
"/home/user/my-sounds/annoying.mp3"
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Met alleen een bestandsnaam (bv. `"koffie.mp3"`) wordt het geluid overal uitgefilterd, zowel uit de bundled als custom sounds. Met een volledig pad filter je alleen dat specifieke bestand.
|
|
168
|
+
|
|
139
169
|
### Alleen eigen geluiden gebruiken
|
|
140
170
|
|
|
141
171
|
```json
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,8 @@ var DEFAULT_CONFIG = {
|
|
|
6
6
|
enabled: true,
|
|
7
7
|
customSoundsDir: null,
|
|
8
8
|
includeBundledSounds: true,
|
|
9
|
+
includeGenZSounds: true,
|
|
10
|
+
disabledSounds: [],
|
|
9
11
|
notifications: {
|
|
10
12
|
enabled: true,
|
|
11
13
|
timeout: 5
|
|
@@ -57,6 +59,8 @@ function loadConfig() {
|
|
|
57
59
|
enabled: userConfig.enabled ?? DEFAULT_CONFIG.enabled,
|
|
58
60
|
customSoundsDir: userConfig.customSoundsDir ?? DEFAULT_CONFIG.customSoundsDir,
|
|
59
61
|
includeBundledSounds: userConfig.includeBundledSounds ?? DEFAULT_CONFIG.includeBundledSounds,
|
|
62
|
+
includeGenZSounds: userConfig.includeGenZSounds ?? DEFAULT_CONFIG.includeGenZSounds,
|
|
63
|
+
disabledSounds: Array.isArray(userConfig.disabledSounds) ? userConfig.disabledSounds : DEFAULT_CONFIG.disabledSounds,
|
|
60
64
|
notifications: {
|
|
61
65
|
enabled: userConfig.notifications?.enabled ?? DEFAULT_CONFIG.notifications.enabled,
|
|
62
66
|
timeout: userConfig.notifications?.timeout ?? DEFAULT_CONFIG.notifications.timeout
|
|
@@ -96,7 +100,7 @@ function getMessage(config, event) {
|
|
|
96
100
|
|
|
97
101
|
// src/sound.ts
|
|
98
102
|
import { platform } from "os";
|
|
99
|
-
import { join as join2, dirname, extname } from "path";
|
|
103
|
+
import { join as join2, dirname, extname, basename, resolve } from "path";
|
|
100
104
|
import { fileURLToPath } from "url";
|
|
101
105
|
import { existsSync as existsSync2, readdirSync } from "fs";
|
|
102
106
|
import { spawn } from "child_process";
|
|
@@ -128,6 +132,19 @@ function getSoundFilesFromDir(directory) {
|
|
|
128
132
|
return [];
|
|
129
133
|
}
|
|
130
134
|
}
|
|
135
|
+
function isSoundDisabled(soundPath, disabledSounds) {
|
|
136
|
+
if (disabledSounds.length === 0)
|
|
137
|
+
return false;
|
|
138
|
+
const fileName = basename(soundPath);
|
|
139
|
+
const resolvedPath = resolve(soundPath);
|
|
140
|
+
return disabledSounds.some((disabled) => {
|
|
141
|
+
if (disabled === fileName)
|
|
142
|
+
return true;
|
|
143
|
+
if (resolve(disabled) === resolvedPath)
|
|
144
|
+
return true;
|
|
145
|
+
return false;
|
|
146
|
+
});
|
|
147
|
+
}
|
|
131
148
|
function getAllSoundFiles(config) {
|
|
132
149
|
const allSounds = [];
|
|
133
150
|
if (config.includeBundledSounds) {
|
|
@@ -136,9 +153,21 @@ function getAllSoundFiles(config) {
|
|
|
136
153
|
allSounds.push(...getSoundFilesFromDir(bundledDir));
|
|
137
154
|
}
|
|
138
155
|
}
|
|
156
|
+
if (config.includeGenZSounds) {
|
|
157
|
+
const bundledDir = getBundledSoundsDir();
|
|
158
|
+
if (bundledDir) {
|
|
159
|
+
const genZDir = join2(bundledDir, "gen-z");
|
|
160
|
+
if (existsSync2(genZDir)) {
|
|
161
|
+
allSounds.push(...getSoundFilesFromDir(genZDir));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
139
165
|
if (config.customSoundsDir && existsSync2(config.customSoundsDir)) {
|
|
140
166
|
allSounds.push(...getSoundFilesFromDir(config.customSoundsDir));
|
|
141
167
|
}
|
|
168
|
+
if (config.disabledSounds && config.disabledSounds.length > 0) {
|
|
169
|
+
return allSounds.filter((sound) => !isSoundDisabled(sound, config.disabledSounds));
|
|
170
|
+
}
|
|
142
171
|
return allSounds;
|
|
143
172
|
}
|
|
144
173
|
function getRandomSound(sounds) {
|
|
@@ -148,7 +177,7 @@ function getRandomSound(sounds) {
|
|
|
148
177
|
return sounds[index];
|
|
149
178
|
}
|
|
150
179
|
async function runCommand(command, args) {
|
|
151
|
-
return new Promise((
|
|
180
|
+
return new Promise((resolve2, reject) => {
|
|
152
181
|
const proc = spawn(command, args, {
|
|
153
182
|
stdio: "ignore",
|
|
154
183
|
detached: false
|
|
@@ -158,7 +187,7 @@ async function runCommand(command, args) {
|
|
|
158
187
|
});
|
|
159
188
|
proc.on("close", (code) => {
|
|
160
189
|
if (code === 0) {
|
|
161
|
-
|
|
190
|
+
resolve2();
|
|
162
191
|
} else {
|
|
163
192
|
reject(new Error(`Command exited with code ${code}`));
|
|
164
193
|
}
|
|
@@ -238,7 +267,7 @@ async function playRandomSound(config) {
|
|
|
238
267
|
import { platform as platform2 } from "os";
|
|
239
268
|
import { spawn as spawn2 } from "child_process";
|
|
240
269
|
async function runCommand2(command, args) {
|
|
241
|
-
return new Promise((
|
|
270
|
+
return new Promise((resolve2, reject) => {
|
|
242
271
|
const proc = spawn2(command, args, {
|
|
243
272
|
stdio: "ignore",
|
|
244
273
|
detached: false
|
|
@@ -246,7 +275,7 @@ async function runCommand2(command, args) {
|
|
|
246
275
|
proc.on("error", reject);
|
|
247
276
|
proc.on("close", (code) => {
|
|
248
277
|
if (code === 0)
|
|
249
|
-
|
|
278
|
+
resolve2();
|
|
250
279
|
else
|
|
251
280
|
reject(new Error(`Exit code ${code}`));
|
|
252
281
|
});
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/sounds/{zit-je-nou-te-poepen-oma-griet.mp3 → gen-z/zit-je-nou-te-poepen-oma-griet.mp3}
RENAMED
|
File without changes
|