#!/usr/bin/env bash # Get first CPU core temperature TEMP=$(sensors | awk '/Core 0/ {print $3}' | tr -d '+°C') # If temperature cannot be read if [ -z "$TEMP" ]; then echo "🌡 N/A" exit 0 fi # Convert to integer (truncate decimal) TEMP_INT=${TEMP%.*} # Color-coded emojis for cyberpunk style if [ "$TEMP_INT" -lt 50 ]; then EMOJI="🟢" elif [ "$TEMP_INT" -lt 70 ]; then EMOJI="🟡" else EMOJI="🔴" fi # Output with some flair echo "$EMOJI $TEMP°C"