mirror of
				https://github.com/tiyn/dotfiles.git
				synced 2025-11-04 06:21:16 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			300 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			300 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
 | 
						|
icon="^b#282828^^c#dfdfdf^  ^d^"
 | 
						|
 | 
						|
temp=""
 | 
						|
 | 
						|
if command -v nvidia-smi > /dev/null; then
 | 
						|
    temp=$(nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader)
 | 
						|
    temp=$(printf %3s $(echo ${temp##*+} | sed "s/\..*//") | tr ' ' ' ')
 | 
						|
else
 | 
						|
    echo ""
 | 
						|
    return
 | 
						|
fi
 | 
						|
 | 
						|
echo "$icon $temp°C"
 |