bond_device.tmux (423B)
1 #!/usr/bin/env bash 2 3 CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 5 device="#($CURRENT_DIR/scripts/bond_interface.sh)" 6 interpolate_string="\#{bond_device}" 7 8 interpolate() { 9 local -r status="$1" 10 local -r status_value=$(tmux show-option -gqv "$status") 11 tmux set-option -gq "$status" "${status_value/$interpolate_string/$device}" 12 } 13 14 main() { 15 interpolate "status-left" 16 interpolate "status-right" 17 } 18 19 main