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

Terminal configuration not working #129

Open
barbaradcf opened this issue Nov 20, 2020 · 5 comments
Open

Terminal configuration not working #129

barbaradcf opened this issue Nov 20, 2020 · 5 comments

Comments

@barbaradcf
Copy link

I looked at other similar issues but still couldn't find a solution for mine.

I copied the following config files/directories from you: /awesome, /kitty, /fontconfig, /picom, /rofi, .Xresources and .zshrc (only modified in order to use the lena theme). I also downloaded all the necessary fonts plus your custom Iosekva build.

However, my terminal is looking like this.

Note how the padding also looks weird, so the problem is not exclusively with the fonts. How can I solve these issues?

@EllatharTheHalfling
Copy link

EllatharTheHalfling commented Nov 22, 2020

What is your underlying OS? Certain config files may be required to be in places designated by your OS that aren't documented here, and this could help to determine if perhaps placement is the issue.

Also for now where did you place the config files/directories?

@barbaradcf
Copy link
Author

Sorry, I thought I had said that I'm using Arch Linux. I put /awesome, /kitty, /fontconfig, /picom and /rofi on ~/.config; .Xresources and .zshrc on ~; and all the fonts on ~/.fonts.

But I don't think my problem is only with the fonts, though, since that probably wouldn't make a huge difference on the terminal padding.

@dorgnarg
Copy link

dorgnarg commented Dec 22, 2020

I'm about a month late but I recently ran into what I think were some similar problems and if you're still having the same problems, here are my solutions:

The problem with the fonts is that kitty doesn't recognize typicons as a monospace font because it doesn't have the property spacing=100. Info here but to check if this is the case, run kitty list-fonts to see if kitty recognizes it as a font. If kitty doesn't list typicons, run fc-list : family spacing outline scalable | grep -e "[Tt]ypicons" and if your result doesn't look like Typicons:spacing=100:outline=True:scalable=True then go to ~/.config/fontconfig/fonts.conf and add

<match target="scan">
    <test name="family">
        <string>Your Font Family Name</string>
    </test>
    <edit name="spacing">
        <int>100</int>
    </edit>
</match>

If that doesn't do it, add symbol_map U+E000-U+E14F typicons somewhere in your kitty config (the codes might be different so double check the unicode range with font-manager or something, I might be using a different version of typicons).

The other font looks right to me but if kitty's main font is also wrong, kitty gets its font information from ~/.config/fontconfig/fonts.conf, so just change the monospace font name there.

If kitty's background color is wrong (it's not the same color as the titlebar so I'm assuming that's the case), then I think you just need to check your colors.rasi file and change xbg to be the same as whatever your colorscheme background color is.

Note how the padding also looks weird,

I'm not sure what you mean by this, your terminal padding looks normal to me, but if you want to change it, kitty.conf has window_padding_width and you can set that to however many pixels you want. Otherwise, it might just be a zsh configuration issue and I didn't use Elena's zsh config so idk about that.

@barbaradcf
Copy link
Author

My reply to your comment seems to be missing, @dorgnarg, so I'm going to rewrite it.

Firstly, thank you for your reply! I tried what you suggested and now typicons is included in the list of monospace fonts. This is what I get when I run kitty list-fonts, but the problem persists.

I'm not sure what you mean by this, your terminal padding looks normal to me, but if you want to change it, kitty.conf has window_padding_width and you can set that to however many pixels you want. Otherwise, it might just be a zsh configuration issue and I didn't use Elena's zsh config so idk about that.

I'm aware that I can change the terminal padding on kitty.conf, but given that I am also using Elena's zsh config file I don't understand why her padding looks so different to mine.

@dorgnarg
Copy link

dorgnarg commented Jan 25, 2021

I tried what you suggested and now typicons is included in the list of monospace fonts. This is what I get when I run kitty list-fonts, but the problem persists.

EDIT: See #121 for a similar problem, it looks like editing fonts.conf to include the extra fonts you care about in <string> tags in the monospace section might help.

If you're using the custom Iosevka font (I'm not sure if it makes a difference but it might) and you included the symbol_map fix in kitty.conf, then it's definitely odd that it's still coming out wrong. One option might be to try using the ttf-typicons font package from the AUR rather than the one here, I'm not sure if there are any major differences but that's the one I'm using (with the added stuff I've mentioned) and the typicons are working for me.

I didn't realize that your prompt looks a little funky too and that's even weirder because I think that should be coming from the NERD fonts not from typicons, and you definitely have a working NERD font.

A potential solution to both problems would be to just add the other font names into fonts.conf. I'm not 100% sure how to do it with the current monospace setting but if you redo it a little bit I think you can do

<alias>
    <family>monospace</family>
    <prefer>
        <family>Iosevka Custom</family>
        <family>Typicons</family>
        <family>Fira Code Nerd Font Mono</family>
    </prefer>
</alias>

If that doesn't work, or it messes with your main terminal font, you could try this instead:

<alias>
    <family>monospace</family>
    <prefer>
        <family>Iosevka Custom</family>
    </prefer>
    <accept>
        <family>Typicons</family>
        <family>Fira Code Nerd Font Mono</family>
    </accept>
</alias>

One other package I have installed that may be helping me is the icons-in-terminal package, I'm not intentionally using it anywhere, but if nothing else is working, try installing it and see if it helps?

I'm aware that I can change the terminal padding on kitty.conf, but given that I am also using Elena's zsh config file I don't understand why her padding looks so different to mine.

Okay I did some investigating and I may be wrong, but it looks like the most recent time the gallery shows a terminal with a visible prompt (to gauge padding) was in the Skyfall screenshot. At the time the Skyfall theme was released, there was not a kitty config file or folder, and when one was added, it specifically included the margin and padding set to 0. My hunch (I'm at work rn so I can't test for a few hours) is that the padding you have right now is correct to the current dotfile setup, but if you want it to look like the terminal in Skyfall, you can comment out or remove the margin and padding lines in kitty.conf. I don't see any thing in .zshrc that could change padding like that unless the prompt that's being used (which isn't included in this repo as far as I can tell) has some special settings.

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

3 participants