mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-25 23:22:28 +02:00 
			
		
		
		
	Merge pull request #93 from Robinhuett/pulseaudio_scroll
Add config option for volume change scroll step size
This commit is contained in:
		| @@ -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_) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alex
					Alex