Plugin

NotificationVolume

Save your ears and set a separate volume for notifications and in-app sounds

Notifications Voice
index.ts
Download

Source

src/plugins/notificationVolume/index.ts
1import { definePluginSettings } from "@api/Settings";
2import { Devs } from "@utils/constants";
3import definePlugin, { OptionType } from "@utils/types";
4
5const settings = definePluginSettings({
6 notificationVolume: {
7 type: OptionType.SLIDER,
8 description: "Notification volume",
9 markers: [0, 25, 50, 75, 100],
10 default: 100,
11 stickToMarkers: false
12 }
13});
14
15export default definePlugin({
16 name: "NotificationVolume",
17 description: "Save your ears and set a separate volume for notifications and in-app sounds",
18 tags: ["Notifications", "Voice"],
19 authors: [Devs.philipbry],
20 settings,
21 patches: [
22 {
23 find: "ensureAudio(){",
24 replacement: {
25 match: /(?=Math\.min\(\i\.\i\.getOutputVolume\(\)\/100)/g,
26 replace: "$self.settings.store.notificationVolume/100*"
27 },
28 },
29 ],
30});
31