Files
.local/bin/statusbar/sb-cpu

17 lines
348 B
Bash
Executable File

#!/bin/sh
# Prints out the cpu temperature
# Emoji used by module
i_temp="󰏈 "
# status2d patch alternating background
# background="^b#333333^"
background="^b#222222^"
# Parse CPU temp with regex, print out the first match
sensors | awk \
-v i_temp="$i_temp" \
-v background="$background" \
'/Core 0/ {print background i_temp $3} ^d^'