Add set_audio_sink, weather, grade
This commit is contained in:
		
							
								
								
									
										19
									
								
								.local/bin/set_audio_sink
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										19
									
								
								.local/bin/set_audio_sink
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| # Load the module until it fails | ||||
| while pactl load-module module-detect; do | ||||
|   : | ||||
| done | ||||
|  | ||||
|  | ||||
| if [ "$DISPLAY" = ":0" ]; then | ||||
|   if ! pactl set-default-sink alsa_output.0.hdmi-stereo; then | ||||
|     pactl set-default-sink alsa_output.1.hdmi-stereo | ||||
|   fi | ||||
|   echo "$DISPLAY set audio" | ||||
| elif [ "$DISPLAY" = ":10.0" ]; then | ||||
|   pactl set-default-sink xrdp-sink | ||||
|   echo "$DISPLAY set audio" | ||||
| else | ||||
|     echo "The DISPLAY variable is set to: $DISPLAY, but not to :0 or :10.0" | ||||
| fi | ||||
		Reference in New Issue
	
	Block a user