From 8600374371f91843064441113f4023cda1730877 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sat, 18 Mar 2023 16:40:57 -0300 Subject: General fish fixes and updates --- .config/fish/functions/_tide_print_item.fish | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .config/fish/functions/_tide_print_item.fish (limited to '.config/fish/functions/_tide_print_item.fish') diff --git a/.config/fish/functions/_tide_print_item.fish b/.config/fish/functions/_tide_print_item.fish new file mode 100644 index 00000000..db5c98b2 --- /dev/null +++ b/.config/fish/functions/_tide_print_item.fish @@ -0,0 +1,22 @@ +function _tide_print_item -a item + v=tide_"$item"_bg_color set -f item_bg_color $$v + + if set -e add_prefix + set_color $item_bg_color -b normal + v=tide_"$_tide_side"_prompt_prefix echo -ns $$v + else if test "$item_bg_color" = "$prev_bg_color" + v=tide_"$_tide_side"_prompt_separator_same_color echo -ns $_tide_color_separator_same_color$$v + else if test $_tide_side = left + set_color $prev_bg_color -b $item_bg_color + echo -ns $tide_left_prompt_separator_diff_color + else + set_color $item_bg_color -b $prev_bg_color + echo -ns $tide_right_prompt_separator_diff_color + end + + v=tide_"$item"_color set_color $$v -b $item_bg_color + + echo -ns $_tide_pad $argv[2..] $_tide_pad + + set -g prev_bg_color $item_bg_color +end -- cgit v1.2.3