#!/usr/bin/env bash #Print the status-left for tmux. # custom left/right status and segments custom_dir=$(dirname $0) # The powerline root directory. TODO any other neater way of getting fullpath? cd ~/dotfiles/tmux/tmux-powerline cwd=$(pwd) # Source global configurations. source "${custom_dir}/config.sh" # Source lib functions. source "${cwd}/lib.sh" segments_path="${cwd}/${segments_dir}" custom_segments_path="${custom_dir}/${segments_dir}" # Mute this statusbar? mute_status_check "left" # Segments declare -A tmux_session_info tmux_session_info+=(["script"]="${custom_segments_path}/tmux_session_info.sh") tmux_session_info+=(["foreground"]="colour234") tmux_session_info+=(["background"]="colour148") tmux_session_info+=(["separator"]="${separator_right_bold}") #tmux_session_info+=(["separator_fg"]="default") register_segment "tmux_session_info" declare -A hostname hostname+=(["script"]="${segments_path}/hostname.sh") hostname+=(["foreground"]="colour0") hostname+=(["background"]="colour33") hostname+=(["separator"]="${separator_right_bold}") register_segment "hostname" declare -A lan_ip lan_ip+=(["script"]="${segments_path}/lan_ip.sh") lan_ip+=(["foreground"]="colour255") lan_ip+=(["background"]="colour24") lan_ip+=(["separator"]="${separator_right_bold}") register_segment "lan_ip" # Print the status line in the order of registration above. print_status_line_left exit 0