mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Add config option for volume change scroll step size
This commit is contained in:
parent
c07037d6b8
commit
e21df5ae36
@ -63,6 +63,7 @@
|
||||
"format-disconnected": "Disconnected ⚠"
|
||||
},
|
||||
"pulseaudio": {
|
||||
//"scroll-step": 1,
|
||||
"format": "{volume}% {icon}",
|
||||
"format-bluetooth": "{volume}% {icon}",
|
||||
"format-muted": "",
|
||||
|
@ -74,8 +74,7 @@ void waybar::modules::Pulseaudio::contextStateCb(pa_context *c, void *data)
|
||||
bool waybar::modules::Pulseaudio::handleScroll(GdkEventScroll *e) {
|
||||
// Avoid concurrent scroll event
|
||||
bool direction_up = false;
|
||||
// XXX/TODO: Change of 100 corresponds to 1%, does that always hold true?
|
||||
uint16_t change = 100;
|
||||
uint16_t change = config_["scroll-step"].isUInt() ? config_["scroll-step"].asUInt() * 100 : 100;
|
||||
pa_cvolume pa_volume = pa_volume_;
|
||||
|
||||
if (scrolling_) {
|
||||
|
Loading…
Reference in New Issue
Block a user