tmux-gspot/scripts/shared.sh

17 lines
308 B
Bash
Raw Normal View History

2023-01-20 01:54:30 +00: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
}
set_tmux_option() {
local option="$1"
local value="$2"
tmux set-option -gq "$option" "$value"
}