Minor edits

This commit is contained in:
Ilan Cosman 2021-10-09 18:52:17 -07:00
parent 3f46f36c8a
commit 56a7054487
2 changed files with 7 additions and 9 deletions

View File

@ -5,11 +5,11 @@ function _tide_item_cmd_duration
math --scale=$tide_cmd_duration_decimals "$CMD_DURATION/1000"%60) # Seconds
if test $time[1] != 0
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' $time[1]'h ' $time[2]'m ' $time[3]'s'
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' "$time[1]h $time[2]m $time[3]s"
else if test $time[2] != 0
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' $time[2]'m ' $time[3]'s'
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' "$time[2]m $time[3]s"
else
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' $time[3]'s'
_tide_print_item cmd_duration $tide_cmd_duration_icon' ' "$time[3]s"
end
end
end

View File

@ -18,14 +18,12 @@ function _tide_prompt
end)
if set -q _tide_prompt_and_frame_color # If prompt is two lines
if test "$tide_left_prompt_frame_enabled" = true
set left[1] "$_tide_prompt_and_frame_color╭─$left[1]"
test "$tide_left_prompt_frame_enabled" = true &&
set left[1] "$_tide_prompt_and_frame_color╭─$left[1]" &&
set left[2] "$_tide_prompt_and_frame_color╰─$left[2]"
end
if test "$tide_right_prompt_frame_enabled" = true
set right[1] "$right[1]$_tide_prompt_and_frame_color─╮"
test "$tide_right_prompt_frame_enabled" = true &&
set right[1] "$right[1]$_tide_prompt_and_frame_color─╮" &&
set right[2] "$right[2]$_tide_prompt_and_frame_color─╯"
end
# 5 = @PWD@ length which will be replaced
math $COLUMNS+5-(string length --visible "$left[1]$right[1]") | read -lx dist_btwn_sides