diff --git a/functions/_tide_item_cmd_duration.fish b/functions/_tide_item_cmd_duration.fish index cc8e8d5..755d6c8 100644 --- a/functions/_tide_item_cmd_duration.fish +++ b/functions/_tide_item_cmd_duration.fish @@ -6,14 +6,12 @@ function _tide_item_cmd_duration set_color $tide_cmd_duration_color - printf '%s' $tide_cmd_duration_icon' ' - if test $hours != 0 - printf '%s' $hours'h ' $minutes'm ' $seconds's' + printf '%s' $tide_cmd_duration_icon' ' $hours'h ' $minutes'm ' $seconds's' else if test $minutes != 0 - printf '%s' $minutes'm ' $seconds's' + printf '%s' $tide_cmd_duration_icon' ' $minutes'm ' $seconds's' else if test $seconds != 0 - printf '%s' $seconds's' + printf '%s' $tide_cmd_duration_icon' ' $seconds's' end end end diff --git a/functions/_tide_sub_configure.fish b/functions/_tide_sub_configure.fish index 29a969d..42cfc1b 100644 --- a/functions/_tide_sub_configure.fish +++ b/functions/_tide_sub_configure.fish @@ -30,10 +30,8 @@ end function _tide_title -a text clear - - string repeat --no-newline --count (math --scale=0 "$fake_columns/2" - (string length $text)/2) ' ' set_color -o - printf '%s\n' $text + string pad --width (math --scale=0 "$fake_columns/2" + (string length $text)/2) $text set_color normal end