Skip to content

Commit

Permalink
VolumeScroll: Always change by 10%
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ckoates committed Oct 13, 2024
1 parent 401c143 commit 73744bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ https://inrixia.github.io/neptune-plugins/VolumeScroll
```
</b>

Lets you scroll on the volume icon to change the volume by 2%. Hold shift to change by 10%.
Lets you scroll on the volume icon to change the volume by 10%.

![image](https://github.com/user-attachments/assets/3a795666-2ed3-4feb-8d42-9374d4f6edd3)

Expand Down
2 changes: 1 addition & 1 deletion plugins/VolumeScroll/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"displayName": "Volume Scroll",
"description": "Scroll on the volume button to change it. (Hold shift to change by 10%)",
"description": "Scroll on the volume button to change it.",
"author": "Nick Oates",
"main": "./src/index.js"
}
3 changes: 1 addition & 2 deletions plugins/VolumeScroll/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { actions, intercept, store } from "@neptune";
function onScroll(event: WheelEvent) {
if (!event.deltaY) return;
const { playbackControls } = store.getState();
const increment = event.shiftKey ? 10 : 2;
const volumeChange = event.deltaY > 0 ? -increment : increment;
const volumeChange = event.deltaY > 0 ? -10 : 10;
const newVolume = playbackControls.volume + volumeChange;
const clampVolume = Math.min(100, Math.max(0, newVolume));
actions.playbackControls.setVolume({
Expand Down

0 comments on commit 73744bf

Please sign in to comment.