Update config
This commit is contained in:
		
							parent
							
								
									9f35c3997a
								
							
						
					
					
						commit
						46c65664f1
					
				
					 10 changed files with 748 additions and 0 deletions
				
			
		
							
								
								
									
										24
									
								
								config/dunst/scripts/volumeNotify.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										24
									
								
								config/dunst/scripts/volumeNotify.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,24 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
#Change Volume Script
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Query Pipewire and Parse Mute State
 | 
			
		||||
mute="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $3}')"
 | 
			
		||||
 | 
			
		||||
# Check to see if it is muted, if so, don't change volume.
 | 
			
		||||
# Otherwise, change volume and Send the notification.
 | 
			
		||||
if [[ "$mute" == "" ]]; then
 | 
			
		||||
	# Change the volume
 | 
			
		||||
	$(wpctl set-volume @DEFAULT_AUDIO_SINK@ $@)
 | 
			
		||||
 | 
			
		||||
	# Query Pipewire and Parse Volume as an Int 
 | 
			
		||||
	volume="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}')"
 | 
			
		||||
	vol=${volume//.}
 | 
			
		||||
	
 | 
			
		||||
	# Send the notification
 | 
			
		||||
	$(dunstify -h int:value:"$vol" Volume: $vol -h string:x-dunst-stack-tag:volume)
 | 
			
		||||
	$(echo $vol > ${XDG_CACHE_HOME:-~/.cache}/eww/vol)
 | 
			
		||||
else
 | 
			
		||||
	# Send the other notification
 | 
			
		||||
	$(dunstify -i ${XDG_CONFIG_HOME:-~/.config}/dunst/images/volumeMute.png "Volume Muted" -h string:x-dunst-stack-tag:volume)
 | 
			
		||||
fi
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue