info.sh 393 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. OS=$("Arch Linux")
  3. WM=$("Dwm")
  4. DATE=$(date +"%H:%M")
  5. CPUUSE=$(cat /proc/loadavg | awk '{print $1}')
  6. for folder in /sys/class/hwmon/hwmon*
  7. do
  8. if [[ -e "$folder/temp1_input" ]]; then
  9. TEMPCPU=$(sed 's/000$/°C/' "$folder/temp1_input")
  10. fi
  11. done
  12. MEMUSE=$(free -h | awk '(NR==2){print $3}')
  13. echo " OS.ARCH | WM.DWM | CPU.$CPUUSE% | TEMP.$TEMPCPU | MEM.$MEMUSE | HORA.$DATE "