IlanCosman / tide

🌊 The ultimate Fish prompt.
MIT License
2.9k stars 108 forks source link

feat(status): add tide_status_display #500

Open chapa opened 6 months ago

chapa commented 6 months ago

Description

Add a tide_status_display variable to display the status item:

Motivation and Context

Closes #454

How Has This Been Tested

I've added some tests to check that setting tide_status_display to 1 and 2 has an impact on displaying status (when character is set).

Checklist

Wiki update proposal ### status | Variable | Description | Type | Default | | ------------------ | ---------------------------------------------------- | --------- | ------- | | `bg_color` | background color when `$status = 0` | `color` | | | `bg_color_failure` | background color when `$status > 0` | `color` | | | `color` | color when `$status = 0` | `color` | | | `color_failure` | color when `$status > 0` | `color` | | | `icon` | icon when `$status = 0` | `icon` | | | `icon_failure` | icon when `$status > 0` | `icon` | | | `display` | whether to display the status according to `$status` | `integer` | 0 | For `tide_status_display`, 0 would show status when `$status > 1`, 1 would show status when `$status > 0`, and 2 would show status in any case.
30350n commented 4 months ago

I'm currently configuring my tide prompt (by hand, not using the tide configure command) and this is exactly what I'm looking for, great job!

Any idea on if/when this will be merged? @IlanCosman Just did a quick glance over the changes and they seem pretty reasonable/minimal.

primeapple commented 2 months ago

A nice addition would be to pull the character item out of the status icon completely. It doesn't belong in there, if the user want's to see both the character and the status that should be possible. Decoupling also makes it easier to debug/maintain/test.