mirror of
https://github.com/elenapan/dotfiles.git
synced 2026-01-09 10:42:41 +08:00
13 lines
338 B
Bash
Executable file
13 lines
338 B
Bash
Executable file
#!/bin/bash
|
|
# Not sure if this works on NVIDIA cards
|
|
update() {
|
|
eww update gpu="$(cat /sys/class/drm/card0/device/gpu_busy_percent)"
|
|
|
|
# Alternatively: With amdgpu_top
|
|
# eww update gpu="$(amdgpu_top -gm --single | awk '/average_gfx_activity/ {print substr($2, 1, length($2)-1)}')"
|
|
}
|
|
|
|
while true; do
|
|
update
|
|
sleep 5
|
|
done
|