From d0beaa3877cd9fa0af03559116f4cb651bd093bc Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Thu, 28 Dec 2023 01:20:52 +0200 Subject: [PATCH] adding cpu and gpu temps --- config/sway/status.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/config/sway/status.sh b/config/sway/status.sh index 88e9159..3dabb30 100755 --- a/config/sway/status.sh +++ b/config/sway/status.sh @@ -1,15 +1,14 @@ #/bin/sh -#UPTIME=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5) -UPTIME=$(uptime -p) +#UPTIME=$(uptime -p) DATE=$(date +'%H.%M.%S %d.%m.%Y') +CPU_TEMP=$(sensors -j | jq '.["k10temp-pci-00c3"].Tccd1.temp3_input') +GPU_TEMP=$(sensors -j | jq '.["amdgpu-pci-0300"].junction.temp2_input') + # Returns the battery status: "Full", "Discharging", or "Charging". #BATTERY=$(cat /sys/class/power_supply/BAT0/status) CPU=$(cat /proc/loadavg | cut -d ' ' -f1,2,3) -# Emojis and characters for the status bar -# 💎 💻 💡 🔌 ⚡ 📁 \| -#echo $uptime_formatted ↑ $linux_version 🐧 $battery_status 🔋 $date_formatted -echo $UPTIME \| load: $CPU \| $DATE +echo C:$CPU_TEMP, G:$GPU_TEMP \| load: $CPU \| $DATE