diff options
author | Cody Hiar <codyfh@gmail.com> | 2017-04-20 19:37:10 -0600 |
---|---|---|
committer | Cody Hiar <codyfh@gmail.com> | 2017-04-20 19:37:10 -0600 |
commit | 2dd809781527976307b47a598887062047e202c9 (patch) | |
tree | 8b29daba2c1ef072f380ef530b7e7d9256e43eb3 /segments/hostname.sh | |
parent | baeb698bb006193559fc5aa1901180a3ccc73b7a (diff) |
Making tmux configuration much easier to manage
Diffstat (limited to 'segments/hostname.sh')
-rwxr-xr-x | segments/hostname.sh | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/segments/hostname.sh b/segments/hostname.sh deleted file mode 100755 index c3dfbf9..0000000 --- a/segments/hostname.sh +++ /dev/null @@ -1,31 +0,0 @@ -# Prints the hostname. - -TMUX_POWERLINE_SEG_HOSTNAME_FORMAT_DEFAULT="short" - -generate_segmentrc() { - read -d '' rccontents << EORC -# Use short or long format for the hostname. Can be {"short, long"}. -export TMUX_POWERLINE_SEG_HOSTNAME_FORMAT="${TMUX_POWERLINE_SEG_HOSTNAME_FORMAT_DEFAULT}" -EORC - echo "$rccontents" -} - -__process_settings() { - if [ -z "$TMUX_POWERLINE_SEG_HOSTNAME_FORMAT" ]; then - export TMUX_POWERLINE_SEG_HOSTNAME_FORMAT="${TMUX_POWERLINE_SEG_HOSTNAME_FORMAT_DEFAULT}" - fi -} -run_segment() { - __process_settings - local opts="" - if [ "$TMUX_POWERLINE_SEG_HOSTNAME_FORMAT" == "short" ]; then - if shell_is_osx || shell_is_bsd; then - opts="-s" - else - opts="--short" - fi - fi - - hostname ${opts} - return 0 -} |