瀏覽代碼

Add CPU temp file for Raspberry Pi/linux

Satadru Pramanik 3 年之前
父節點
當前提交
d561057cd8
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      neofetch

+ 4 - 0
neofetch

@@ -2219,6 +2219,10 @@ get_cpu() {
                     break
                 }
             done
+	    # If on a Raspberry Pi...
+            if grep -q "Raspberry Pi" /proc/device-tree/model; then
+                temp_dir=/sys/class/thermal/thermal_zone0/temp
+            fi
 
             # Get CPU speed.
             if [[ -d "$speed_dir" ]]; then