From 695a67531f794a7f743ac3c070e080359021748a Mon Sep 17 00:00:00 2001 From: Ethan Edwards Date: Sun, 9 Aug 2020 01:50:07 -0400 Subject: [PATCH] init for refresh_rate NOT WORKING --- scripts/cpu_info.sh | 2 +- scripts/dracula.sh | 6 +++++- scripts/gpu_usage.sh | 2 +- scripts/ram_info.sh | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/cpu_info.sh b/scripts/cpu_info.sh index c5180cd..7bc72d1 100755 --- a/scripts/cpu_info.sh +++ b/scripts/cpu_info.sh @@ -23,7 +23,7 @@ main() { cpu_percent=$(get_percent) echo "CPU $cpu_percent" - sleep 10 + sleep $RATE } # run main driver diff --git a/scripts/dracula.sh b/scripts/dracula.sh index f2d68c3..f324c12 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -32,6 +32,10 @@ main() show_ram_usage=$(get_tmux_option "@dracula-ram-usage" false) show_gpu_usage=$(get_tmux_option "@dracula-gpu-usage" false) show_time=$(get_tmux_option "@dracula-show-time" true) + show_refresh=$(get_tmux_option "@dracula-refresh-rate" 5) + + # exporting the value for the other scripts to read + export RATE=$show_refresh # Dracula Color Pallette white='#f8f8f2' @@ -79,7 +83,7 @@ main() esac # sets refresh interval to every 5 seconds - tmux set-option -g status-interval 5 + tmux set-option -g status-interval $show_refresh # set clock to 12 hour by default tmux set-option -g clock-mode-style 12 diff --git a/scripts/gpu_usage.sh b/scripts/gpu_usage.sh index 3bb1445..6935af7 100755 --- a/scripts/gpu_usage.sh +++ b/scripts/gpu_usage.sh @@ -29,7 +29,7 @@ main() { gpu_usage=$(get_gpu) echo "GPU $gpu_usage" - sleep 10 + sleep $RATE } # run the main driver main diff --git a/scripts/ram_info.sh b/scripts/ram_info.sh index 7b3a6a2..5263e5d 100755 --- a/scripts/ram_info.sh +++ b/scripts/ram_info.sh @@ -39,7 +39,7 @@ main() { ram_percent=$(get_percent) echo "RAM $ram_percent" - sleep 10 + sleep $RATE } #run main driver