Merge branch 'master' of https://github.com/ethancedwards8/tmux into freebsd_support

This commit is contained in:
Ethan Edwards 2020-09-01 21:40:47 -04:00
commit 47fe175441
6 changed files with 50 additions and 4 deletions

View file

@ -1,5 +1,17 @@
#!/usr/bin/env bash
# function for getting the refresh rate
get_tmux_option() {
local option=$1
local default_value=$2
local option_value=$(tmux show-option -gqv "$option")
if [ -z $option_value ]; then
echo $default_value
else
echo $option_value
fi
}
get_percent()
{
case $(uname -s) in
@ -56,9 +68,11 @@ get_percent()
main()
{
# storing the refresh rate in the variable RATE, default is 5
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
ram_percent=$(get_percent)
echo "RAM $ram_percent"
sleep 10
sleep $RATE
}
#run main driver