get_tmux_option(), normalize_percent_len() in scripts/utils.sh
source scripts/utils.sh in dracula.sh, cpu_info.sh, gpu_usage.sh, ram_info.sh normalize_percent_len for ram_info custom labels for cpu-usage, gpu-usage, ram-usage
This commit is contained in:
parent
151cd3e45f
commit
87df275c6e
5 changed files with 42 additions and 48 deletions
|
@ -2,16 +2,8 @@
|
|||
# setting the locale, some users have issues with different locales, this forces the correct one
|
||||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
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
|
||||
}
|
||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source $current_dir/utils.sh
|
||||
|
||||
main()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue