extract pulse_sink script
This commit is contained in:
		
							parent
							
								
									43a1960e18
								
							
						
					
					
						commit
						690ab81d76
					
				
					 5 changed files with 20 additions and 18 deletions
				
			
		
							
								
								
									
										12
									
								
								scripts/pulse_sink
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								scripts/pulse_sink
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
output=$(printf "HDMI\nHeadphones" | wdmenu -i -p "Output:")
 | 
			
		||||
vol=$(pamixer --get-volume)
 | 
			
		||||
case "$output" in
 | 
			
		||||
    HDMI)
 | 
			
		||||
        pactl set-default-sink alsa_output.pci-0000_07_00.1.hdmi-stereo-extra1
 | 
			
		||||
        ;;
 | 
			
		||||
    Headphones)
 | 
			
		||||
        pactl set-default-sink alsa_output.pci-0000_09_00.4.analog-stereo
 | 
			
		||||
        ;;
 | 
			
		||||
esac
 | 
			
		||||
pamixer --set-volume "$vol"
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue