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

Use "regular" Unicode chars for status display #119

Open
0cjs opened this issue Aug 8, 2024 · 0 comments
Open

Use "regular" Unicode chars for status display #119

0cjs opened this issue Aug 8, 2024 · 0 comments

Comments

@0cjs
Copy link

0cjs commented Aug 8, 2024

The current status display looks like this when cut and pasted from my terminal:

c$ kup list
┌──────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────────────┐
│ Package name (alias) │ Installed version                                                                                              │ Status                     │
├──────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────┤
│ k                    │ f73063d8260ca1a40c9e850db60f3a9a1dcb691f?narHash=sha256-pFOw/vJ6g9bM8PzfiaZtSc89Vohmcu/rCkxZiQAeAEo%3D         │ 🟠 newer version available │
│ kup                  │ ee27b243e7944099d1868b8ccb21d2a74b016e30?narHash=sha256-BKmc7jyM6xJ%2BfcCKO7X%2Bw57s5n%2B3fpC6%2BK//NtcmqDw%3D │ 🟢 installed               │
│ kavm                 │                                                                                                                │ 🔵 available               │
│ kevm                 │                                                                                                                │ 🔵 available               │
│ kplutus              │                                                                                                                │ 🔵 available               │
│ kmir                 │                                                                                                                │ 🔵 available               │
│ kontrol              │                                                                                                                │ 🔵 available               │
│ kmxwasm              │                                                                                                                │ 🔵 available               │
└──────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────────────┘

However, in the terminal itself (urxvt), which is configured to use the Inconsolata font, it looks like this:
image

And here's what a similar display looks like when pasted into Slack:
image

We see these drastic differences because the Unicode characters you're using, \u1F7E0, \u1F7E2, \u1F535, etc. are fairly new: a fair number of fonts don't yet support these, and some systems (such as Slack) don't support these because of the risk they won't be displayed correctly. This is made all the worse only colour systems can support these particular characters properly.

I suggest you change these to older, more standard characters that will display correctly in far more cases, including monochrome displays. For example:

▲ newer version available   (\u25B2)
● installed                 (\u25CF)
○ available                 (\u25CB)

Note that the "icons" will still get the correct colour so long as you send the terminal colour code you're using for the text before you send the "icon" character.

While we're at it, it would also be nice to swap the positions of the "Status" and "Installed version" columns so that those of us cutting to terminal width (e.g., when piping into less -S) can see the more important Status column within 80 columns or whatever we're using.

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

No branches or pull requests

1 participant