koppor
January 24, 2024, 5:04pm
1
I am using Starship in GNOME Terminal (which is the default terminal, isn’t it?)
My prompt outputs non-found unicode characters:
I was expecting that in the default setting of GNOME Terminal / Starship on NixOS, it would work.
I chose an explicit font (e.g., Liberation Mono), but still missing characters:
What can I do to get it working? Is it a Starship issue?
I think you might want to install the nerd font symbol as suggested in Presets | Starship , more precisely the FiraCode nerd font Nerd Fonts - Iconic font aggregator, glyphs/icons collection, & fonts patcher I guess you can get it on NixOs with:
fonts.fonts = with pkgs; [
fira-code-nerdfont
];
1 Like
Alternatively, if you want to use a font that isn’t pre-built by the nerd-font team, you can use the nerd-font-patcher to patch any font with the symbols you need.
My flake GitHub - Lyndeno/apple-fonts.nix: Nix flake to easily install Apple fonts from their website. uses the nerd-font-patcher to provide the Apple fonts with the nerd symbols installed. For reference.
1 Like
koppor
January 24, 2024, 7:18pm
4
Thank you for the hint.
Think, I need to reboot the machine:
koppor
January 24, 2024, 7:26pm
5
After reboot
OK, Firefox also does not work - but this is a side issue, but might help me to trace the issue down:
koppor
January 24, 2024, 8:03pm
6
OK, I pasted the Firefox characters into emacs (and then into the Terminal): Works.
Only “🅶” U+1F176 Negative Squared Latin Capital Letter G Unicode Character is left. Not rendering anywhere.
Test: 🅶
Ah, it is the symbol for gradle:
"gradle": {
"default": {
"detect_extensions": [
"gradle",
"gradle.kts"
],
"detect_files": [],
"detect_folders": [
"gradle"
],
"disabled": false,
"format": "via [$symbol($version )]($style)",
"recursive": false,
"style": "bold bright-cyan",
"symbol": "🅶 ",
"version_format": "v${raw}"
},
"allOf": [
{
"$ref": "#/definitions/GradleConfig"
}
]
},
Think, starship uses the wrong symbol there.
koppor
January 24, 2024, 8:20pm
7
Submitted a proposal to starship to use a different icon: Change gradle icon from G to by koppor · Pull Request #5724 · starship/starship · GitHub
Local fix: In home.nix
:
programs.starship = {
...
settings = {
...
gradle.symbol = " ";
};
};
Additionally (Thanks to the hints here)
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
(pkgs.nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
...
Have you tried to change the default font in Gnome console?
koppor
January 24, 2024, 8:36pm
9
Sure. Gnome Terminal instantly switches the font:
When a font is installed and no restart is made, the output is bad. See the screenshot above.
I have the impression that a “nixos-rebuild switch” overwrites the default gnome terminal configuration?
koppor
January 29, 2024, 7:59am
10