mirror of
				https://github.com/tiyn/dotfiles.git
				synced 2025-11-03 22:11:16 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			766 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			766 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
 | 
						|
vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}' | sed -e 's/\.//g' | sed 's/^0*//')"
 | 
						|
 | 
						|
if [ "$vol" -gt "100" ]; then
 | 
						|
	vol_info="^c#ffff00^  "
 | 
						|
elif [ "$vol" -gt "70" ]; then
 | 
						|
	vol_info="^c#dfdfdf^  "
 | 
						|
elif [ "$vol" -eq "0" ]; then
 | 
						|
	vol_info="^c#dfdfdf^  "
 | 
						|
else
 | 
						|
	vol_info="^c#dfdfdf^  "
 | 
						|
fi
 | 
						|
 | 
						|
$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q '\[MUTED\]') && vol_info="^c#ff0000^  "
 | 
						|
 | 
						|
if wpctl get-volume @DEFAULT_SOURCE@ | grep -q '\[MUTED\]'; then
 | 
						|
	mic="^c#ff0000^  "
 | 
						|
else
 | 
						|
	mic="^c#dfdfdf^  "
 | 
						|
fi
 | 
						|
 | 
						|
if [ -f ~/.local/state/dnd_mode.lock ]; then
 | 
						|
    notifications="^c#ff0000^  "
 | 
						|
else
 | 
						|
    notifications="^c#dfdfdf^  "
 | 
						|
fi
 | 
						|
 | 
						|
vol=$(printf %3s $vol | tr ' ' ' ')
 | 
						|
printf "^b#282828^%s%s%s^d^" "$mic" "$vol_info" "$notifications"
 |