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

bug: Starship - unusable font in Linux console (TTY) #6272

Open
2 tasks done
LemmusLemmus opened this issue Jan 5, 2025 · 0 comments
Open
2 tasks done

bug: Starship - unusable font in Linux console (TTY) #6272

LemmusLemmus opened this issue Jan 5, 2025 · 0 comments
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@LemmusLemmus
Copy link

LemmusLemmus commented Jan 5, 2025

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

By default, Starship requires a nerd font to display properly. However, in the TTY / virtual console, the font choice is severely limited and one cannot use nerd fonts.
Hence, with Starship enabled, all I see is squares of varying colors. instead of the usual symbols.

Steps to reproduce

  1. Enable Starship: programs.starship.enable = true;
  2. Let bashIntegration be set to true (default) programs.starship.enableBashIntegration = true; (assuming that one uses bash in the TTY).
  3. Switch to e.g. TTY2 (ctrl+alt+F2).
  4. Provided that the Starship config is not specifically such that it avoids using special characters, one should see squares in the prompt where usually such special characters are displayed.

Proposed fix

In starship.nix, one could simply, in addition to the current $TERM != "dumb" check, add a check $TERM != "linux" (as proposed here).
There could potentially be more places in the home-manager where such a check could be useful.

However, I guess it is possible that one uses a custom Starship configuration that completely avoids nerd fonts and other uncommon Unicode characters. One might even want to go as far as using separate configs for the TTY and elsewhere.

This issue is rather easy to fix on ones own, by simply disabling e.g. bashIntegration and copying and modifying the bash initExtra, so I guess this issue might be more of a matter of opinion (although judging by the home-manager code it might be slightly trickier if you use the fish shell in the TTY). Feel free to close this issue as not planned in that case. I just thought it was worth mentioning.

Maintainer CC

No response

System information

 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.7, NixOS, 24.11 (Vicuna), 24.11.20250103.d29ab98`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.11`
 - nixpkgs: `/nix/store/mr3pq6jnd0j7vny01q8r8a2ij8z2mn2d-source`
@LemmusLemmus LemmusLemmus added bug triage Issues or feature request that have not been triaged yet labels Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

4 participants