perf(ags): make volume slider more fluid
This commit is contained in:
parent
ca84e7de34
commit
bb6c5c1781
1 changed files with 7 additions and 4 deletions
|
@ -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,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue