dnkl changed the topic of #foot to: Foot - fast, lightweight and minimalistic Wayland terminal emulator || 1.16.2 || https://codeberg.org/dnkl/foot || channel logs: https://libera.irclog.whitequark.org/foot
newchair has quit [Ping timeout: 256 seconds]
leon-p has quit [Read error: Connection reset by peer]
leon-p has joined #foot
Hummer12007 has quit [Read error: Connection reset by peer]
Guest807 has quit [Read error: Connection reset by peer]
dekedro has quit [Write error: Connection reset by peer]
ursa-major has quit [Read error: Connection reset by peer]
Hummer12007 has joined #foot
tachi has joined #foot
dekedro has joined #foot
coder_kalyan has quit [Read error: Connection reset by peer]
ursa-major has joined #foot
coder_kalyan has joined #foot
kode54 has quit [Ping timeout: 256 seconds]
kode54 has joined #foot
ayushnix has joined #foot
tmpm697 has joined #foot
<tmpm697> but i can't wrap foot as i need to know its `pid` when i start foot
<tmpm697> but i also need title reflect current `empty command` when i start foot
<tmpm697> like just show the title like `$pwd` when start foot
<tmpm697> i.e: when current zsh pwd when start foot is /path/folder, the title will be `/path/folder` when foot first started
<tmpm697> i start foot like: `foot -T <my_titile> --config <my_config>` --> i have to set a fix title at first to manage the foot window
<tmpm697> but i want the title reflect current shell's path when 1st started, how to?
<tmpm697> but even if i'm not settings `-T <title>` --> foot will always fall back to its default `terminal` in foot.ini file
<tmpm697> my foot window title only change if i enter the 1st command
<tmpm697> `tmux` provide somthing like `set -g set-titles-string <pattern_here>` --> this will instruct its window title to change according to --> prefer if foot support this.
<tmpm697> so if i 1st start `tmux` the window title is there correctly.
<bookworm> why wouldn't you be able to use a wrapper script?
<bookworm> you can just exec into foot after all
<tmpm697> i need to know foot's pid when i start foot, can't do that with wrapper?
cbb has joined #foot
<bookworm> it's still the same process
<bookworm> exec replaces the currently running shell
<tmpm697> what u mean by this? `"you can just exec into foot after all"`
hmht has joined #foot
<tmpm697> if i from sway/config do `exec start_foot_terminal.sh` --> this wrapper from https://codeberg.org/dnkl/foot/wiki#foot-e-cmd-does-not-set-the-window-title-to-cmd --> how can i get the `pid` of foot process?
<tmpm697> you mean foot pid will be the same as wrapper pid?
<bookworm> yes
<ninewise> if the wrapper script ends with `exec foot ...`, yes
<cbb> foot's PID isn't the same as the child PID
<bookworm> like inside of the script you use exec, a shell built in
<bookworm> cbb: what child?
<cbb> bookworm: there's always a child process
<bookworm> no?
<cbb> in this case probably a shell
<bookworm> I think you are missing the context
<tmpm697> correct me if i'm wrong, so if i have `vi script.sh: start_foot_terminal.sh &; pid=$(echo $!)` --> this is the same as `vi script.sh: foot -T title --config /my/config &; pid=$(echo $!)` ?
<bookworm> they wanna set the win title. For that a wrapper script as linked above can be used. They need the pid of foot after the spawn. Theit worry is that pid of foot is not pid of wrapper, but that's not the case there
<tmpm697> in sway/config i will have: `exec script.sh`
<ninewise> tmpm697, yes, but only if `start_foot_terminal.sh` ends in `exec foot -T title --config /my/config`
<tmpm697> `start_foot_terminal.sh` will end with `exec foot --title="$title" "$@"` as in https://codeberg.org/dnkl/foot/wiki#foot-e-cmd-does-not-set-the-window-title-to-cmd, still work?
<ninewise> as a side note, use `pid="$!"` instead of `pid=$(echo $!)`
<bookworm> with the added constraint that you can't do anything with that pid them from the wrapper
<bookworm> then*
<bookworm> unless you pass that thing back, your wrapper ceases to exist and takes that local var with it to the grave
<tmpm697> what u mean by "cant' do anything with that pid"?
<bookworm> so, what are you doing with the pid?
<tmpm697> from that pid I will set `mark` in sway
<bookworm> how?
<tmpm697> like `swaymsg '[pid=$pid] mark my_mar`
<bookworm> yes. But how do you pass the pid to sway?
<tmpm697> `mark` that foot window in sway
<tmpm697> check above command, sway support pid of a process that has window to set a mark on it.
<bookworm> yes. I'm asking where you call that (and when)
<tmpm697> i call set mark in `script.sh` right after get the pid
<cbb> bookworm: oh yeah, my bad... I missed the context from that wiki page
<bookworm> then why are you arguing that you can't use a wrapper?
<bookworm> you don't need to keep the pid the same as your wrapper
<bookworm> your wrapper can simply spawn foot, get the pid, call swaymessage and die
<tmpm697> i just need to know if pid is the same with exec and that wrapper
<tmpm697> ok ty
<bookworm> note that you do not want exec in your case
<bookworm> anything you try to exec below it is dead code that never gets executed, but you'll figure that out quickly enough ;)
<tmpm697> so if in wrapper i'm not use `exec foot` --> pid of wrapper will still the same as foot process?
<bookworm> no it won't but you don't need it
<tmpm697> what u mean i `don't need it`?
<tmpm697> i need to run other command after `start_foot_terminal.sh` wrapper
<bookworm> you don't need two indirections. You'll use the argument parsing from the example wrapper and then normally spawn foot in a subcommand. You then immediately *from the same wrapper* issue the swaymsg command
<bookworm> the wrapper returns to sway and off it goes through the other config directives
<tmpm697> i don't want to bunddle wrapper with `sway command`
<bookworm> what bundle?
<tmpm697> wapper only to call foot
<tmpm697> then wapper needs to return pid of foot
<bookworm> sigh
<tmpm697> let me do some tests and get back to u
<bookworm> you want sway --> exec wrapper --> exec wrapper ?
<bookworm> why?
<bookworm> but if you want, easy. Just use the wrapper as given in the example, then wrap that in your swamsg wrapper that you write
<bookworm> the inner wrapper replaces itself, so your outer wrapper can just use the pid of the inner wrapper
<bookworm> but it's a pointless indirection
<bookworm> you can just remove one of those layers
MerchantOfVenice has joined #foot
<tmpm697> i can just not, that wrapper in https://codeberg.org/dnkl/foot/wiki#foot-e-cmd-does-not-set-the-window-title-to-cmd to allow setting window tittle right after it's created and it's workaround for foot
<tmpm697> if foot has option like i mentioned above as `tmux` then i would not need a wapper
<tmpm697> i need the 1st wrapper in sway/config: `exec script.sh` because i need to process window
<tmpm697> the second one is purely workaround for foot.
<bookworm> my point is that one wrapper is enough and you anyway need it in your case
<bookworm> the wiki gives you an example of how to do it, not the only way available to you. You are free to modify that thing ;)
<tmpm697> can i specify empty command to warrper? like `wapper.sh -e ""`
<tmpm697> i want to just show current pwd when first start foot with wrapper
mvdan has quit [Remote host closed the connection]
<tmpm697> this wrapper doesn't work, just tried it and sway complaint about "fractional scale not avail
<tmpm697> how can i just start `foot -T <title>` and having title showing current pwd right after its first start?
<tmpm697> no wrapper
<dnkl> if you're just starting a regular shell, then why not simply configure the shell to set the window title?
<tmpm697> dnkl : you know that i have this in my zsh config: https://codeberg.org/dnkl/foot/wiki#piping-last-command-s-output
<tmpm697> that will change foot window title according to what command it runs.
<tmpm697> now at start of foot, the title is fixed --> then it's bad because the whole live cycle of it is showing window title dynamically
<tmpm697> show i prefer to have title dynamically at start of it or at least make it current pwd
<dnkl> none of this makes any sense whatsoever
<dnkl> the link you posted does not set the title, or have anything at all to do with the title
<dnkl> and you mention zsh, but link to a fish script
<tmpm697> use precmd to dynamically set title
<dnkl> the wiki doesn't have any examples for setting the window title
<dnkl> Google how to set the window title on zsh
<tmpm697> what i want here is just have option to set title string as same as `precmd`
<tmpm697> with swaywm, just have a option like `--mark my_mark` that support to mark the window if under swaywm.
<dnkl> it's also a precmd, so you'll have to combine it with whatever other precmd's you have
<toast> I could write a few but someone else would have to add them to the wiki :)
<tmpm697> i basically can't have foot title dynamically reflect current pwd when first start :)
<tmpm697> uncomment `title` and `lock-title` won't help
<tmpm697> comment  out *
alexherbo2 has joined #foot
<tmpm697> so again, no way to have foot title reflect current pwd when start it?
MerchantOfVenice has quit [Ping timeout: 260 seconds]
<toast> foot is a terminal emulator, it doesn't really have those concepts for the most part
<toast> it could reflect the startup pwd but it wouldn't do what you think it does
<toast> you want the application running in it to update the title in whatever way you want it to be updated using escape codes
<toast> I can write examples for how to do this in various shells, as I mentioned, but I'm a little busy right this second :)
<tmpm697> just write me a simple example to have foot reflect current zsh's pwd when first start foot :)
<tmpm697> got it in #zsh, ty
tmpm697 has quit [Quit: Client closed]
<toast> tmpm697: https://brpaste.xyz/kf_9ig should do it
<toast> notably it'll only run on chpwd which is what you want for reporting pwd
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #foot
alexherbo2 has quit [Remote host closed the connection]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #foot
radu242753435752 has joined #foot
radu242753435752 has quit [Ping timeout: 256 seconds]
hmht has quit [Ping timeout: 260 seconds]
sevz has quit [Quit: WeeChat 4.2.1]
sevz has joined #foot
andyrtr has quit [Quit: ZNC 1.9.0 - https://znc.in]
Biolunar has joined #foot
andyrtr has joined #foot
cbb has quit [Quit: WeeChat 4.2.1]
hspak has quit [Quit: The Lounge - https://thelounge.chat]
hspak has joined #foot
ollysmith has quit [Quit: ZNC 1.8.2+deb4+b2 - https://znc.in]
ollysmith has joined #foot
luca has quit [Remote host closed the connection]
luca has joined #foot
xd1le has joined #foot
baltazar has quit [Quit: Lost terminal]
baltazar has joined #foot