mirror of
				https://github.com/tiyn/dotfiles.git
				synced 2025-11-03 22:11:16 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			478 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			478 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
 | 
						|
model=$(cat /proc/cpuinfo | grep "model name" | head -n1)
 | 
						|
 | 
						|
if printf "$model " | grep -Fqe "AMD"; then
 | 
						|
    temp=$(sensors | awk '/Tctl/ {print  $2}')
 | 
						|
else
 | 
						|
    temp=$(sensors | awk '/Package id 0/ {print  $4}')
 | 
						|
fi
 | 
						|
 | 
						|
temp=$(printf %3s $(echo ${temp##*+} | sed "s/\..*//") | tr ' ' ' ')
 | 
						|
 | 
						|
if [ $temp -gt 100 ]
 | 
						|
then
 | 
						|
    icon="^b#282828^^c#ff0000^ "
 | 
						|
elif [ $temp -gt 80 ]
 | 
						|
then
 | 
						|
    icon="^b#282828^^c#ffff00^ "
 | 
						|
else
 | 
						|
    icon="^b#282828^^c#dfdfdf^ "
 | 
						|
fi
 | 
						|
 | 
						|
echo "$icon"
 |