mirror of
https://github.com/dnlbauer/dotfiles.git
synced 2026-09-10 21:45:30 +00:00
desktop->shared
This commit is contained in:
21
profiles/shared/.config/i3/scripts/gpu
Executable file
21
profiles/shared/.config/i3/scripts/gpu
Executable 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
|
||||
Reference in New Issue
Block a user