diff --git a/core_temp.sh b/core_temp.sh new file mode 100755 index 0000000..0092b42 --- /dev/null +++ b/core_temp.sh @@ -0,0 +1,18 @@ +#!/bin/zsh +temp=$(sensors | grep 'Package id' | awk '{print $4}') + +if [[ "${1}" == "-t" ]]; then + shift + echo -n "${temp}" +else + val=$(grep -Po '[\d.]+' <<< ${temp}) + + + if [[ ${val} -le 30.0 ]]; then + printf "^fg(#0000cc)" + elif [[ ${val} -le 60.0 ]]; then + printf "^fg(#cc7700)" + elif [[ ${val} -gt 60.0 ]]; then + printf "^fg(#cc0000)" + fi +fi diff --git a/nvme_temp.sh b/nvme_temp.sh new file mode 100755 index 0000000..51c8e1d --- /dev/null +++ b/nvme_temp.sh @@ -0,0 +1,17 @@ +#!/bin/zsh +temp=$(sensors nvme-pci-3e00 | grep Composite | awk '{print $2}') + +if [[ "${1}" == "-t" ]]; then + shift + echo -n "${temp}" +else + val=$(grep -Po '[\d.]+' <<< ${temp}) + + if [[ ${val} -le 30.0 ]]; then + printf "^fg(#0000cc)" + elif [[ ${val} -le 60.0 ]]; then + printf "^fg(#cc7700)" + elif [[ ${val} -gt 60.0 ]]; then + printf "^fg(#cc0000)" + fi +fi diff --git a/virt_temp.sh b/virt_temp.sh new file mode 100755 index 0000000..e042802 --- /dev/null +++ b/virt_temp.sh @@ -0,0 +1,19 @@ +#!/bin/zsh + +#!/bin/zsh +temp=$(sensors pch_skylake-virtual-0 | grep temp1 | awk '{print $2}') + +if [[ "${1}" == "-t" ]]; then + shift + echo -n "${temp}" +else + val=$(grep -Po '[\d.]+' <<< ${temp}) + + if [[ ${val} -le 30.0 ]]; then + printf "^fg(#0000cc)" + elif [[ ${val} -le 60.0 ]]; then + printf "^fg(#cc7700)" + elif [[ ${val} -gt 60.0 ]]; then + printf "^fg(#cc0000)" + fi +fi