perf(ags): make volume slider more fluid

This commit is contained in:
matt1432 2023-09-12 15:57:37 -04:00
parent ca84e7de34
commit bb6c5c1781

View file

@ -42,10 +42,13 @@ export const SliderBox = Box({
}),
Slider({
value: `${exec('bash -c "$EWW_PATH/volume.sh vol"')}`,
onChange: 'bash -c "$EWW_PATH/volume.sh set {}"',
min: 0,
max: 100,
connections: [[Audio, slider => {
if (Audio.speaker) {
slider.value = Audio.speaker.volume;
}
}, 'speaker-changed']],
onChange: ({ value }) => Audio.speaker.volume = value,
max: 0.999,
draw_value: false,
}),
],