[Emacs] Always use selected sink
This commit is contained in:
		@@ -2,4 +2,4 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
pulseaudio-ctl "$@"
 | 
					pulseaudio-ctl "$@"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
notify-send " " -i notification-audio-volume-high -h int:value:$(SINK=1 pavolume) -h string:synchronous:volume
 | 
					notify-send " " -i notification-audio-volume-high -h int:value:$(pavolume) -h string:synchronous:volume
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,10 @@
 | 
				
			|||||||
command_exists 'open' || command_exists 'xdg-open' && alias open='xdg-open'
 | 
					command_exists 'open' || command_exists 'xdg-open' && alias open='xdg-open'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pasink () {
 | 
				
			||||||
 | 
						pacmd list-sinks | grep '* index' | get_cols ' -1'
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pavolume () {
 | 
					pavolume () {
 | 
				
			||||||
	pactl list sinks | grep '^[[:space:]]Volume:' | \
 | 
						pactl list sinks | grep '^[[:space:]]Volume:' | \
 | 
				
			||||||
    head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'
 | 
					    head -n $(( $(pasink) + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user