Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(status): add tide_status_display #500

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chapa
Copy link

@chapa chapa commented Apr 1, 2024

Description

Add a tide_status_display variable to display the status item:

  • either only for complex statutes (0, the default and current behavior),
  • or for all non-zero statutes (1),
  • or for all statutes (2).

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).

  • I have tested using Linux.
  • I have tested using MacOS.

Checklist

  • I am ready to update the wiki accordingly.
  • I have updated the tests accordingly.
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.

@chapa chapa requested a review from IlanCosman as a code owner April 1, 2024 23:20
@30350n
Copy link

30350n commented May 20, 2024

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Status not shown with certain configurations
3 participants