dnkl changed the topic of #foot to: Foot - fast, lightweight and minimalistic Wayland terminal emulator || 1.13.1 || https://codeberg.org/dnkl/foot || channel logs: https://libera.irclog.whitequark.org/foot
Biolunar has joined #foot
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #foot
smach has joined #foot
Nulo has quit [Ping timeout: 268 seconds]
Nulo has joined #foot
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #foot
sugarbeet has quit [Ping timeout: 252 seconds]
sugarbeet has joined #foot
smach has quit []
bgs has joined #foot
bgs has quit [Remote host closed the connection]
caveman has quit [Remote host closed the connection]
caveman has joined #foot
caveman has quit [Quit: caveman]
caveman has joined #foot
caveman has quit [Quit: rebooting]
rjarry has joined #foot
<rjarry> hey all, I've asked over on #weechat but my problem seems to be related to foot
<rjarry> basically, when running weechat in alacritty (or other term emulators), a bell character activates the urgent flag
<rjarry> this is not working in foot
<rjarry> when I exit weechat, echo -e '\a' >&2 does set the urgent flag though
<rjarry> there seems to be a weird interaction between weechat and foot which I don't understand
<rjarry> if anybody already experienced this and has a fix, it would be much appreciated
<dnkl> rjarry: this is documented in the foot.ini man page
<rjarry> dnkl: yes, I have that enabled
<rjarry> otherwise it would not work at all
<rjarry> when running /exec -bg 'sleep 5 && echo -e "\a" >&2' from weechat, nothing happens, when running sleep 5 && echo -e "\a" >&2 from outside weechat, the window urgent flag is set
<dnkl> the urgent flag is only set of the foot window does NOT have keyboard focus
<rjarry> yep, I added that sleep 5 to have the time to focus to another window
<dnkl> also make sure no one has emitted the 1042 private mode escape sequence
<rjarry> the same thing works in other terminals
caveman has joined #foot
<rjarry> hmm, how could I know that ?
<rjarry> any specific string I could grep?
<dnkl> I can reproduce. But I can promise you, this is simply because the BEL isn't forwarded to foot. Question is why
<rjarry> yeah :)
<rjarry> could it be some ncurses internal thing that parses foot terminfo in a bad way?
<dnkl> maybe... what does "infocmp | grep bel" return?
<rjarry> bel=^G
<rjarry> from outside weechat
<rjarry> same from inside weechat
<rjarry> dnkl: for what its worth, the bell is not sent using any terminfo capability, it is using printf("\a") https://github.com/weechat/weechat/blob/master/src/core/wee-command.c#L5233-L5237
<dnkl> using your echo test from within weechat, I'm NOT seeing urgent being set on any terminal...
<rjarry> one sec
<rjarry> ok, forget it, it will not work with /exec
<rjarry> the thing is /print -beep cannot be delayed
<dnkl> you can try setting bell.command="notify-send foo bar", and bell. command-focused=yes
<dnkl> assuming you have a notification daemon running
<dnkl> otherwise replace with some other command
<dnkl> this'll let you see if the BEL is received by foot or not
<rjarry> I can receive the notification when doing /print -beep in weechat with these settings in foot.ini
<rjarry> dnkl: I didn't find any string that looks remotely similar to a 1042 CSI private escape sequence neither in weechat sources, nor in ncurses
<dnkl> I did some logging, and don't see why urgent shouldn't be set
<dnkl> which compositor are you using?
<rjarry> sway
<dnkl> makes no sense that it would work outside weechat but not inside
<rjarry> I know
<dnkl> foot doesn't know, or care, about which program is currently running...
<rjarry> by the way I have found a way to send a BEL explicitly and have the time to focus another window
<rjarry> /print -date +5 -beep
<rjarry> from weechat
<rjarry> ah damn, no it does not delay
<dnkl> which other terminals have you tested?
<rjarry> alacritty
<rjarry> I'll test some others
<dnkl> I was mostly interested in whether they were Wayland or X11
<dnkl> as urgency is handled completely different
<rjarry> alacritty should be wayland native
<rjarry> dnkl: can you ping me here? I started weechat in kitty to check it out
<dnkl> rjarry: ping
<rjarry> yep, it sets the urgent flag with kitty as well
<rjarry> there is one detail (I'm not sure that matters), my foot window is in a sway scratchpad
<rjarry> i.E. a floating window
<dnkl> doesn't matter to foot
<dnkl> foot will use the xdg activation protocol to signal urgency to the compositor
<dnkl> this is done a long as the window does but have focus
<dnkl> after that, it's up to the compositor
<rjarry> yeah, I had followed the patches
<dnkl> try running foot with WAYLAND_DEBUG=1
<rjarry> ok
<rjarry> it is started now
<rjarry> ping me again?
<dnkl> see if you get anything related to xdg activation when the window is unfocused
<dnkl> rjarry: ping
<rjarry> maybe you need more context?
<dnkl> rjarry: so, both inside and outside weechat looks the same. That'd mean it's sway's fault... not that that makes any sense either...
<rjarry> T_T
<dnkl> rjarry: try comparing with e.g kitty.. 🤷
<dnkl> running out of ideas here..
<rjarry> dnkl: yeah, good idea
<rjarry> if all fails, I'll resort to gdb, lol
bgs has joined #foot
<rjarry> dnkl: after inspecting the wayland debug logs of alacritty/kitty/foot with weechat running and sending a bell character, I noticed only one difference
<rjarry> dnkl: foot misses one log line that relates to "xdg_activation" wl_registry@**.global(34, "xdg_activation_v1", 1)
<rjarry> I have absolutely no idea what is that for
<rjarry> dnkl: I think I may have found what is different, I run weechat in a floating sway window (scratchpad) when the scratchpad is hidden, the urgent flag is ignored, when it is not displayed but does not have keyboard focus, the urgent flag is honnored by the compositor
<rjarry> so in the end, it may very well be a wayland/sway issue
<rjarry> yeah, I just confirmed that with kitty. same behaviour when the scratchpad is hidden
* rjarry continues pilgrimage over on #sway
bgs has quit [Remote host closed the connection]
hexa- has quit [Quit: WeeChat 3.7.1]
hexa- has joined #foot