1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-08 18:03:13 +00:00
Dotfiles/.config/polybar/polybar-scripts/system-gpu-intel/system-gpu-intel.sh

11 lines
256 B
Bash
Raw Normal View History

2020-07-27 04:59:00 +00:00
#!/bin/sh
gpu=$(sudo intel_gpu_frequency --get)
gpu_cur=$(echo "$gpu" | grep cur | awk '{ print $2 }')
gpu_max=$(echo "$gpu" | grep max | awk '{ print $2 }')
gpu_percent=$(echo "$gpu_cur/$gpu_max*100" | bc -l | cut -d "." -f 1)
echo "# $gpu_percent %"