summaryrefslogtreecommitdiff
path: root/home-config/fish/functions/_tide_print_item.fish
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2024-04-05 11:57:45 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2024-04-05 11:57:45 -0400
commitb88d77fb2d0d5028a6f5670695dee6bec129501f (patch)
tree2536b0461d297e647cf07157641c9b1223339adf /home-config/fish/functions/_tide_print_item.fish
parent776a7ca55d2d2c3f396de91db1c6c3c5065012cd (diff)
ahhh sloppy fish, still needs fixing, esp with the vars
Diffstat (limited to 'home-config/fish/functions/_tide_print_item.fish')
-rw-r--r--home-config/fish/functions/_tide_print_item.fish22
1 files changed, 22 insertions, 0 deletions
diff --git a/home-config/fish/functions/_tide_print_item.fish b/home-config/fish/functions/_tide_print_item.fish
new file mode 100644
index 0000000..db5c98b
--- /dev/null
+++ b/home-config/fish/functions/_tide_print_item.fish
@@ -0,0 +1,22 @@
1function _tide_print_item -a item
2 v=tide_"$item"_bg_color set -f item_bg_color $$v
3
4 if set -e add_prefix
5 set_color $item_bg_color -b normal
6 v=tide_"$_tide_side"_prompt_prefix echo -ns $$v
7 else if test "$item_bg_color" = "$prev_bg_color"
8 v=tide_"$_tide_side"_prompt_separator_same_color echo -ns $_tide_color_separator_same_color$$v
9 else if test $_tide_side = left
10 set_color $prev_bg_color -b $item_bg_color
11 echo -ns $tide_left_prompt_separator_diff_color
12 else
13 set_color $item_bg_color -b $prev_bg_color
14 echo -ns $tide_right_prompt_separator_diff_color
15 end
16
17 v=tide_"$item"_color set_color $$v -b $item_bg_color
18
19 echo -ns $_tide_pad $argv[2..] $_tide_pad
20
21 set -g prev_bg_color $item_bg_color
22end