tmux-indicators/scripts/helpers.sh

12 lines
215 B
Bash
Raw Normal View History

2018-12-20 17:07:33 -05:00
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
}