mirror of
https://github.com/Manoj-HV30/i3wm-ubuntu-dotfiles.git
synced 2026-05-16 19:35:23 +00:00
Initial Ubuntu i3wm dotfiles
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/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"
|
||||
|
||||
Reference in New Issue
Block a user