Hacker News new | past | comments | ask | show | jobs | submit login
Foot: A fast and minimalistic Wayland terminal emulator (codeberg.org)
100 points by mikojan on Dec 14, 2021 | hide | past | favorite | 40 comments



Yet another terminal that insists on having its own terminfo.

This isn't a big deal if you only need to interact with a few machines via ssh, but when you are working with 100+, including networking gear that has no hope of using a custom terminfo, it really gets to be a gnarly pain.

I must be getting old.


You're not getting old; this is a real nuisance.

That said, and to add onto the other reply, you're in luck: OpenSSH 8.8p1 includes support¹ for setting TERM in your SSH config with SetEnv². In my experience this works fine with just the client OpenSSH being up-to-date connecting to servers with older SSH versions and terminfo databases.

In your case, you might want to use a wildcard host at the end of your file to default to a more compatible TERM variable, and then override to foot's TERM variable value for the hosts you use that do have up-to-date terminfo:

    Host my-up-to-date-terminfo-host
      SetEnv TERM=foot
    
    Host *
      SetEnv TERM=xterm-256color
I've been using Foot for months now and just came across this issue, so it's nice there's now a path to get the full-fledged Foot experience only where it's supported. I usually stay comfortably inside GUI Doom Emacs for most shell workflows, but it's nice to have a modern, Wayland-native, no-nonsense terminal emulator when I do break my config :P.

¹ https://github.com/openssh/openssh-portable/commit/f64f8c00d...

² https://www.mankier.com/5/ssh_config#SetEnv


Will this also work around a similar annoying problem with Kitty? Sorry I am not familiar enough with the workings of terminals to understand if that is the same type of problem.


It is the same issue, yes.


Just to add that if you share your homedir (or just your dotfiles) among hosts I think you should be able to copy a terminfo file containing the right terminfo stuff in your dotfiles and use the same setenv ssh config line to set the TERMINFO env var to point to that file.


Thank you! This is exactly what I've been looking for!


I remember trying this and it would get overwritten. Cool to see that OpenSSH is still seeing such careful maintenance.


Foot's terminfo package is available separately on most distros. Foot has many advanced features like some Kitty protocols (for features adjacent to OSC-8 sequences) and sixel graphics, so it makes sense to use one.

If you don't want this, you can just use xterm-256color instead.


Xterm supports sixel if compiled with support for it enabled, but it's behind a command line switch. "xterm -ti vt340" will get you an xterm with sixel if it's compiled in. The TERM env var when xterm is started that way is still "xterm" (just checked) so presumably you shouldn't need an updated terminfo for sixel?


What else would you have it do? If you use any other terminal's TERM value, you'd better implement it perfectly or you're going to create compatibility bugs, and for bonus points you can't do anything the original couldn't do (see sibling comment about sixel, etc.)


Yeah, I tend to force TERM to xterm or similar irrespective of the terminal. If a terminal can't handle the subset of xterm's behaviour that the apps I use rely on, I just won't use that terminal. It takes really little to make most apps work fine with TERM set to one of the common choices - I know, I hacked together a simple terminal to explore some things and getting most things running took a really small subset of mostly vt100.

They need to support the common subset anyway because a lot of software looks at terminfo and assumes "mostly vt100" no matter what.


That seems like the right thing to do to me. You can override the default for your remote hosts, but any nonstandard terminal emulator should probably not pretend to be a standard terminal emulator that secretly knows a bunch of tricks.

If you're using such a terminal, adding alias ssh="TERM=screen ssh" would probably fix most of your issues without sacrificing functionality in the rest of the system or relying on applications assuming your terminal is more capable than it says to be.


XTGETTCAP is implemented in many terminals which replaces the need for terminfo, but it's not used yet by client libraries except for notcurses afaik.


It's in the docs … on my servers this fixes things as well:

    S=my_server ; ssh $S 'mkdir -p ~/.terminfo/f/' ; scp /usr/share/terminfo/f/foot $S:~/.terminfo/f/foot
PITA still.


I bounce between Linux and MacOS enough that I prefer a cross platform terminal emulator.

My current favorite is kitty. Anyone have a different cross platform TE they prefer?


Alacritty. Not as featureful which is rather a plus for me.


I love Alacritty, but it has some awful bugs (in the rendering or windowing library they use, not Alacritty itself) with nVidia + Wayland.



I use Alacritty but I don't think it has any edge over Kitty feature-wise so I suggest sticking to what is already working for you.


Like another commenter here, I've been using foot since I had an issue with alacritty. It would lag and duplicate my pastes, which would then also crash certain other programs.

foot is really nice. It supports bitmap fonts and wayland, both are musts for me. It also has a cool url hints mode like termite did. I always missed that while using alacritty (after termite, or rather pango, dropped bitmap support and I had to switch).


Been using foot for a little while after I had some libgl issues with my alacritty install that I didn’t at the time have time to dig into. foot is great: fast, minimal, gets out of the way. No complaints here.


I am able to use Foot on my MNT Reform which doesn't have working GPU acceleration right now, which would defeat the purpose of using Alacritty even if I could get it to run. Foot runs very quickly just using the CPU. https://codeberg.org/dnkl/foot/wiki/Performance

I love it, even if I prefer other terminals on faster / GPU-accelerated computers.


This is a cool project!

Been using it for about 6 months now as my default terminal. It’s easy to configure, has all the modern bells and whistles, and you can run even run it as a daemon.


Wow, that’s the first time seeing codeberg in the wild.


The Gadgetbridge project also uses it


headsup, pretty sure one still has to recompile foot to change their font or font size. yeah it's that minimalistic.

edit: comment says there is a way to change font size. oops, good. is it possible to change the font without recompiling?

edit2: this post is wrong, yay! there's a .ini file! great. apologies, i'm not sure if i simply had out of date, or just wrong knowledge someone shared. or maybe i was thinking of 'st' terminal?


The readme contains this section:

https://codeberg.org/dnkl/foot#user-content-configuration

There's also a template in the repo:

https://codeberg.org/dnkl/foot/src/branch/master/foot.ini

So, looks like one has to just set the font in the config file ;)


Probably were thinking of 'st', or some other project under the umbrella of software that certainly sucks more.


you were probably remembering 'st'


And st's font size is adjustable at runtime with C-S-Page(Up|Down) (with config.def.h, which you are meant to copy to config.h and recompile if you want to change the default font size or font, unless you apply the patches that let you set them with command line flags or Xresources).


You press Ctrl and + but okay?

E: Even simpler method for more comedic effect?


Cool project, solid contender for Alacritty.


does it scroll one line at a time or one pixel at a time? can it do 120fps?


[flagged]


Some dude spends countless hours creating a neat little project and gives it away for free and the best response you can come up with is "I don't like how you named one of your thousands of files"?


I'm very sick of the "offensiveness" of everything all the time nowadays. It's a word used in many other contexts, not one of them being remotely offensive in nature. Gotta fill the boredom and lack of productivity with words to complain about.


[flagged]


This is somehow worse. Nothing about this post is political, why do you have to roll on in here with your culture war bullshit?


Make sense. Fight filling the boredom and lack of productivity with words to complain about by filling the boredom and lack of productivity with complains about words to complain about.


[flagged]


If you have nothing constructive or of a substance to say, you probably shouldn't respond.


Why don't you start by making the Open Group change their POSIX specification to stop using "master" and "slave" in pseudo terminals first?

https://pubs.opengroup.org/onlinepubs/009696899/functions/gr...


This project has a master branch in the git repository so it's still there. No reason to remove it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: