Skip to content

Commit

Permalink
Merge pull request #274 from Theoreticallyhugo/master
Browse files Browse the repository at this point in the history
allow user to force getting gpu info without asking lspci #272
  • Loading branch information
ethancedwards8 committed Aug 18, 2024
2 parents 5626c88 + 65bdd9e commit afabaa0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
10 changes: 8 additions & 2 deletions scripts/gpu_power.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ get_platform()
{
case $(uname -s) in
Linux)
gpu=$(lspci -v | grep VGA | head -n 1 | awk '{print $5}')
echo $gpu
# use this option for when you know that there is an NVIDIA gpu, but you cant use lspci to determine
ignore_lspci=$(get_tmux_option "@dracula-ignore-lspci" false)
if [[ "$ignore_lspci" = true ]]; then
echo "NVIDIA"
else
gpu=$(lspci -v | grep VGA | head -n 1 | awk '{print $5}')
echo $gpu
fi
;;

Darwin)
Expand Down
10 changes: 8 additions & 2 deletions scripts/gpu_ram_info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ get_platform()
{
case $(uname -s) in
Linux)
gpu=$(lspci -v | grep VGA | head -n 1 | awk '{print $5}')
echo $gpu
# use this option for when you know that there is an NVIDIA gpu, but you cant use lspci to determine
ignore_lspci=$(get_tmux_option "@dracula-ignore-lspci" false)
if [[ "$ignore_lspci" = true ]]; then
echo "NVIDIA"
else
gpu=$(lspci -v | grep VGA | head -n 1 | awk '{print $5}')
echo $gpu
fi
;;

Darwin)
Expand Down
10 changes: 8 additions & 2 deletions scripts/gpu_usage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ get_platform()
{
case $(uname -s) in
Linux)
gpu=$(lspci -v | grep VGA | head -n 1 | awk '{print $5}')
echo $gpu
# use this option for when you know that there is an NVIDIA gpu, but you cant use lspci to determine
ignore_lspci=$(get_tmux_option "@dracula-ignore-lspci" false)
if [[ "$ignore_lspci" = true ]]; then
echo "NVIDIA"
else
gpu=$(lspci -v | grep VGA | head -n 1 | awk '{print $5}')
echo $gpu
fi
;;

Darwin)
Expand Down

0 comments on commit afabaa0

Please sign in to comment.