This commit is contained in:
Daniel Bauer
2018-09-14 11:56:02 +02:00
parent e0b529b91a
commit a807f5eb1e
45 changed files with 53 additions and 14 deletions

21
.config/polybar/gpu.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
t_warn=50
t_crit=70
GPU=$(nvidia-smi -q | grep Gpu | awk '{print $3}')
if [ $GPU -gt $t_crit ]
then
printf " %d%%" "$GPU"
printf "\n %d%%" "$GPU"
printf "\n#fb4934\n"
elif [ $GPU -gt $t_warn ]
then
printf " %d%%" "$GPU"
printf "\n %d%%" "$GPU"
printf "\n#fabd2f\n"
else
printf " %d%%" "$GPU"
printf "\n %d%%" "$GPU"
fi