<delthas>
dnkl: would there be a way to get and properly reset the terminal cursor shape on exit of an app? if not, could that be a new spec/change we could introduce?
<dnkl>
delthas: DECRQSS to get the current shape on entry, then use the regular escape to set the shape on exit
kode54 has quit [Read error: Connection reset by peer]
kode542 has joined #foot
kode542 has quit [Client Quit]
kode542 has joined #foot
kode542 is now known as kode54
sgm has left #foot [#foot]
Biolunar has quit [Ping timeout: 256 seconds]
MistakeNot has joined #foot
<MistakeNot>
i'd like to have foot switch to a different theme while i'm in an ssh session connected to a remote machine and i'm trying to think of a good way to go about doing that.
<j`ey>
MistakeNot: using OSC10/11
<j`ey>
there's something called theme.sh
Biolunar has joined #foot
<MistakeNot>
j`ey, thanks
<dnkl>
MistakeNot: you can also choose where the script with the OSC-4/10/11/12 sequences should be: locally, run just before connecting, or remotely, run by e.g the shell rc scripts
<dnkl>
regardless, you likely want to restore the theme locally, after disconnecting
<MistakeNot>
yes
<MistakeNot>
a wrapper script around ssh seems a bit messy though, i guess i'm wondering if there's a more efficient way
<dnkl>
you might also be interested in the new push/pop escapes that was recently added to master
<j`ey>
seems like ssh has a LocalCommand config option, maybe you can add it in there
an3223 has quit [Ping timeout: 260 seconds]
<MistakeNot>
dnkl, is there documentation for that?
<MistakeNot>
j`ey, hmm that could work. doesn't seem like there's a way to run a command once disconnected to restore the theme but that's not the end of the world
an3223 has joined #foot
<j`ey>
I was trying to look up if there was a way to do that
<MistakeNot>
the fact this isn't a Solved problem gives me pause though
<MistakeNot>
or rather, that this apparently isn't the solution other people are landing on to easily differentiate terminals running a remote connection
<dnkl>
MistakeNot: lots of people change the theme at runtime, but haven't heard of anyone wanting to do it while ssh:ing
<MistakeNot>
dnkl, blackbox-terminal supports the feature FWIW
<MistakeNot>
except there i think it's changing gtk decorations to red for ssh and sudo but same idea
<j`ey>
I wonder how it knows about ssh/sudo
<dnkl>
the terminal have to start looking at what's currently running to be able to do that. That's a guessing game, and we don't do that in foot. That's intentional, and won't change
<dnkl>
j`ey: you can look at the process tree and identity the "leaf" process
<j`ey>
dnkl: :|
<j`ey>
im looking to see if thats what it does
<dnkl>
but say you recognize "sudo". What about "doas"? Or the new fangled run0? What about tomorrow's new thingy you don't even know the name of?
<j`ey>
MistakeNot: using an alias or something is probably the best way, since ssh doesnt have a LocalCommandExit
<MistakeNot>
last i checked the feature was broken in blackbox-terminal anyway, so...
<j`ey>
I saw a suggestion to use a LocalCoammnd that waits for it's parent command to exit..
<MistakeNot>
oh that's not bad
<dnkl>
MistakeNot: re documentation. xterm's "ctlseqs" is where you want to look
<dnkl>
the new push/pop escapes are called XTPUSHCOLORS and XTPOPCOLORS
<dnkl>
OSC-4/10 etc are also documented in the same document
<MistakeNot>
dnkl, thanks i'll take a look
<dnkl>
MistakeNot: just remember those new escapes aren't in any released versions of foot yet
<j`ey>
you'd still need a wrapper or something around ssh to do the XTPOPCOLORS
MistakeNot has quit [Ping timeout: 272 seconds]
MistakeNot has joined #foot
qyliss_ has quit [Ping timeout: 246 seconds]
qyliss has joined #foot
sterni has quit [Read error: Connection reset by peer]
sefidel has quit [Ping timeout: 268 seconds]
sterni has joined #foot
sefidel has joined #foot
MistakeNot has quit [Ping timeout: 246 seconds]
qyliss has quit [Ping timeout: 268 seconds]
qyliss has joined #foot
MistakeNot has joined #foot
<kaisan>
MistakeNot: let us know your progress please. Im interested in something similar. Im used to having different backgrounds depending on the remote environment (otap).