From a588a9d5179ff11b0b3a8e6eefde011884f2109b Mon Sep 17 00:00:00 2001 From: Guido Kraemer Date: Wed, 26 Apr 2023 13:44:09 +0200 Subject: [PATCH] fix gpu memory --- scripts/dracula.sh | 2 +- scripts/gpu_ram_info.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/dracula.sh b/scripts/dracula.sh index e841aa5..b5b02d5 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -142,7 +142,7 @@ main() script="#($current_dir/gpu_usage.sh)" elif [ $plugin = "gpu-ram-usage" ]; then - IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-gpu-ram-usage-colors" "pink dark_gray") + IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-gpu-ram-usage-colors" "cyan dark_gray") script="#($current_dir/gpu_ram_info.sh)" elif [ $plugin = "cpu-usage" ]; then diff --git a/scripts/gpu_ram_info.sh b/scripts/gpu_ram_info.sh index f04d895..07de6df 100755 --- a/scripts/gpu_ram_info.sh +++ b/scripts/gpu_ram_info.sh @@ -27,7 +27,7 @@ get_gpu() { gpu=$(get_platform) if [[ "$gpu" == NVIDIA ]]; then - usage=$(nvidia-smi --query-gpu=memory.used,memory.total --format=csv,noheader,nounits | awk '{ used += $0; total +=$2 } END { printf("%dGB / %dGB\n", used / 1024, total / 1024) }') + usage=$(nvidia-smi --query-gpu=memory.used,memory.total --format=csv,noheader,nounits | awk '{ used += $0; total +=$2 } END { printf("%dGB/%dGB\n", used / 1024, total / 1024) }') else usage='unknown' fi @@ -38,7 +38,7 @@ main() { # storing the refresh rate in the variable RATE, default is 5 RATE=$(get_tmux_option "@dracula-refresh-rate" 5) - gpu_label=$(get_tmux_option "@dracula-gpu-usage-label" "GPU RAM") + gpu_label=$(get_tmux_option "@dracula-gpu-usage-label" "VRAM") gpu_usage=$(get_gpu) echo "$gpu_label $gpu_usage" sleep $RATE