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({ Slider({
value: `${exec('bash -c "$EWW_PATH/volume.sh vol"')}`, connections: [[Audio, slider => {
onChange: 'bash -c "$EWW_PATH/volume.sh set {}"', if (Audio.speaker) {
min: 0, slider.value = Audio.speaker.volume;
max: 100, }
}, 'speaker-changed']],
onChange: ({ value }) => Audio.speaker.volume = value,
max: 0.999,
draw_value: false, draw_value: false,
}), }),
], ],