IlanCosman/tide

How to reset the bg color when a custom item is added as the last item on the right prompt

ramgp opened this issue · 1 comments

ramgp commented

I wrote this function trying to add the uptime info to my right-side prompt:

function _tide_item_uptime
    command uptime | sd '.*\s+up\s(\d+)\s(\w{1}).*(\d+:\d+),.*' '[$1$2 $3]'
end

set -a tide_right_prompt_items uptime
I didn't want a new section with a separator and so on, reason I didn't use the _tide_print_item helper, I want it next to the current time

I want it to have the same colors as the current time item, but the bg color leaks into the prompt on the next line
image
How can I prevent this from happening?

tide version: 5.5.1
term: xterm-256color
os: macOS 13.2.1
terminal emulator: Kitty
fish startup: 9.13 millis
fisher plugins: jorgebucaran/fisher ilancosman/tide@v5 catppuccin/fish patrickf1/fzf.fish

You need to explicitly set the colors for your item. To set them to the same color as the time item, use the following:

set --universal tide_uptime_color $tide_time_color
set --universal tide_uptime_bg_color $tide_time_bg_color