Nulo has quit [Read error: Connection reset by peer]
Nulo has joined #foot
gbrlsnchs has quit [Quit: zzz]
rodrgz has quit [Quit: WeeChat 3.5]
smach has joined #foot
talismanick has joined #foot
rrogalski has joined #foot
peetee has quit [Read error: Connection reset by peer]
mannerism has quit [Remote host closed the connection]
mannerism has joined #foot
<Consolatis>
dnkl: i am currently playing around a bit more with XTGETTCAP, it seems to not escape "\" (like in the end char of "Ms"), is this intended? And on a related note: is there some flag or string I could look up before actually sending a request to an unsupporting terminal and expecting a reply? (preferably xtgettcap or something similar which would then be "\EP+q%p1%s\E\\" for foot)
smach has quit []
smach has joined #foot
<Consolatis>
wait, its actually slightly different, "fsl" isn't encoded at all ( (which actually makes sense as its hex anyway), but "Ms" is encoded
<Consolatis>
sorry, multi line paste..
<Consolatis>
so what i am seeing via xtgettcap is this: fsl: "\x1b\\" (two bytes, not encoded), Ms: "\\E]52;%p1%s;%p2%s\\E\\" (encoded)
Ordoviz has joined #foot
smach has quit []
<dnkl>
Consolatis: I remember following xterm and kitty here, and the difference is due to one of them containing parameters. Not saying I like it, but didn't want to introduce a different behavior at the time
<dnkl>
re. adding a reminding capability, that would be fine. We should try to sync with kitty though
<dnkl>
the fallback is to emit the XTGETTCAP sequence followed by a DA, and based on the reply figure out if the terminal supports XTGETTCAP or not
<Consolatis>
re fallback: that could work i guess. not as nice as just doing a test -n "$(tput xtgettcap)" but if we can rely on terminals ignoring the sequence + responding to DA that would work as well
<Consolatis>
re parsing: so I guess something like if "%p" in data: data = unescape(data) would do the trick then
<Consolatis>
but that would still mean that "Ms" seems to miss a terminating "\\" (so it has 4 "\" at the end)?
<Consolatis>
well actually 2 not 4, currently only seems to have 1
jao has quit [Ping timeout: 268 seconds]
<dnkl>
Consolatis: I'll check the missing \ as soon as I can
<Consolatis>
dnkl: take your time, I am just playing around with it so far. Thinking about adding a xtgettcap terminfo backend to tcell at one point in the future though
<dnkl>
Consolatis: no worries. It's just that things mentioned here are forgotten if I don't do them soon 😅
<Consolatis>
sounds very familiar :)
<dnkl>
Consolatis: fwiw, here's foot's logic for escaping vs. not when generating the built-in terminfo
<dnkl>
and yeah, looks like we're not double-escaping plain \
<Consolatis>
ah, nice one, will mimic that with tcell then. it already has an internal unescape() for infocmp -x output so it only needs to use it when there is an % in the hex decoded value
<Consolatis>
the decision to only escape when containing parameters seems pretty random though
<Consolatis>
as its hex encoded anyway
<dnkl>
I completely agree. I have a few guesses as to why, but in the end it does appear to not have been given enough thought
<dnkl>
we could change this. probably better to do it now, before XTGETTCAP use becomes common. But then we'd be incompatible with at least kitty, and maybe xterm too, depending on which way we go
<Consolatis>
i don't think any one of the two can be used as a complete terminfo replacement though afaiu: xterm only gives keys back and kitty misses bools, also there doesn't seem to be a terminfo name for the query yet. so imho you could totally use a new DSC, remove the parameter encoding, add a new terminfo name for it, define one query -> one response and be the de facto standard for the future which kitty / xterm could adapt to
<Consolatis>
DCS*
<Consolatis>
this protocol would solve not just remote connection issues but also the issue of different versions of the same terminal emulator supporting different features. e.g. using foot but a distro shipped ncurses that omits some features from foot's terminfo
<Consolatis>
not sure how to define the reply format though, guess it could also be a terminfo name using a parameter.. is there some kind of reverse tiparm() to allow applications to automatically parse replies?
an3223_ has quit [Ping timeout: 258 seconds]
<dnkl>
Consolatis: I think this is something worth opening an issue on codeberg.
<Consolatis>
alright, will do soon
<Consolatis>
looks like foot's implementation of xtgettcap is solid, got it running as tcell's only terminfo backend and everything seems fine :)
<Consolatis>
only returns 256 colors + setaf / setab for indexed color instead of direct color though. Not sure how to deal with things like that properly within the xtgettcap framework
<Consolatis>
other than additionally defining setdcf / setdcb that is
<Consolatis>
reusing setaf / setab for direct color might not have been the best decision
<dnkl>
Consolatis: you can look for setrgbb and setrgbf
<dnkl>
they're non-standard (not used in ncurses), but *are* used by (and defined by) tmux
<dnkl>
of course, nothing of what we've discussed here will work for users that use the foot terminfo from ncurses since all these capabilities are "non-standard" and won't be merged upstream
<dnkl>
but, if we start adding more capabilities, used by more applications than tmux, we could change our recommendation to distributions, and say our terminfo is better :)
ayushnix has joined #foot
ayushnix has joined #foot
ayushnix has quit [Changing host]
hill_ has quit [Quit: leaving]
ayushnix has quit [Ping timeout: 252 seconds]
smach has joined #foot
talismanick has quit [Ping timeout: 244 seconds]
ayushnix has joined #foot
ayushnix has joined #foot
ayushnix has quit [Changing host]
ayushnix has quit [Remote host closed the connection]
ayushnix has joined #foot
an3223_ has joined #foot
smach has quit []
cbb has joined #foot
smach has joined #foot
sav_ has joined #foot
smach has quit [Remote host closed the connection]
sav_ has quit [Remote host closed the connection]
jao has joined #foot
smach has joined #foot
smach has quit []
an3223_ has quit [Read error: Connection reset by peer]
an3223_ has joined #foot
cbb has quit [Ping timeout: 248 seconds]
cbb has joined #foot
smach has joined #foot
smach has quit [Remote host closed the connection]
rrogalski has quit [Quit: Client closed]
rrogalski has joined #foot
rrogalski is now known as toadrrogalski
smach has joined #foot
toadrrogalski is now known as Toadalski
cbb has quit [Ping timeout: 252 seconds]
cbb has joined #foot
Biolunar has quit [Quit: leaving]
jao has quit [Remote host closed the connection]
jao has joined #foot
smach has quit [Remote host closed the connection]
smach has joined #foot
talismanick has joined #foot
Ordoviz has quit [Quit: WeeChat 3.6]
ayushnix has quit [Ping timeout: 252 seconds]
ayushnix has joined #foot
ayushnix has joined #foot
ayushnix has quit [Changing host]
Toadalski has quit [Quit: Client closed]
smach has quit []
cbb has quit [Quit: WeeChat 3.6]
ayushnix has quit [Ping timeout: 252 seconds]
ayushnix has joined #foot
ayushnix has joined #foot
ayushnix has quit [Changing host]
ayushnix has quit [Remote host closed the connection]