ifreund changed the topic of #river to: river - a dynamic tiling wayland compositor || https://github.com/riverwm/river || channel logs: https://libera.irclog.whitequark.org/river/
waleee has quit [Quit: WeeChat 3.5]
Guest5571 has quit [Ping timeout: 272 seconds]
snakedye has quit [Ping timeout: 246 seconds]
londoed has quit [Quit: Leaving]
hspak61 has joined #river
hspak6 has quit [Ping timeout: 246 seconds]
hspak61 is now known as hspak6
notzmv has quit [Ping timeout: 260 seconds]
hill has joined #river
<Shinyzenith[m]> Hi, I generally write wayland clients in rust, today I decided to give zig a try and I'm honestly quite dumbstruck as to how I'm supposed to instantiate the screencopy manager
<Shinyzenith[m]> I was able to use the scanprotocol step to scan the xml header
<Shinyzenith[m]> Any help would be appreciated
<Shinyzenith[m]> note : I looked to ltoplevels by isaac and it used some wl.client.zwlr which didn't seem to work
<Shinyzenith[m]> s/to/into/
lxsameer has joined #river
<novakane> what's your code? because it just works like other protocol, you just need to use the zwlr prefix instead of wl, e.g something like this https://paste.sr.ht/~novakane/4eca48272e240a5f13eb777300e5089ba1be243f
<novakane> Shinyzenith[m]: your using wayland.client.wl.client.* here
<Shinyzenith[m]> oh...yeah I just noticed that I was being stupid
<novakane> no worries, happened to the best of us :P
<Shinyzenith[m]> one last question, https://github.com/ifreund/ltoplevels/blob/trunk/ltoplevels.zig#L26= where is this type coming from?
<Shinyzenith[m]> Is it from the scanned xml?
<novakane> yes, that the name in the protocol convert to zig format
<Shinyzenith[m]> So in my case should I just use
<Shinyzenith[m]> zwlr.ScreencopyManagerV1?
<Shinyzenith[m]> that throws errors ^
<Shinyzenith[m]> specifically, member not found
<novakane> are you using the latest commit from zig-wayland master?
<novakane> if so did you use the scanner.generate(FOO, 3) in build.zig?
<Shinyzenith[m]> novakane: Yep latest
<Shinyzenith[m]> novakane: Uhh Nope will do that right now
<Shinyzenith[m]> Alright I'll try it
<Shinyzenith[m]> from reading the commit message what I understood is that I need to manually generate everything that includes screencopy frame and manager right?
<Shinyzenith[m]> or is it just the frame
<Shinyzenith[m]> s/frame/manager?/
<ifreund> Shinyzenith[m]: only global interfaces
<ifreund> so in this case just zwlr_screencopy_manager_v1
<Shinyzenith[m]> Ok understood, thank you
notzmv has joined #river
<Shinyzenith[m]> I followed the readme this time
<Shinyzenith[m]> is this a possible bug in zig-wayland?
<ifreund> Shinyzenith[m]: possibly, yes. This code is fairly new
<ifreund> I'll haev a look in a minute
<Shinyzenith[m]> Thank you. I'll see if I can try my hands at debugging this.
<ifreund> Shinyzenith[m]: ah, there are two separate requests that create the screen copy frame object. My current code doesn't handle that
<ifreund> the fix is pretty easy though, just a minute
<Shinyzenith[m]> ifreund: yeah capture output and capture output region iirc
<Shinyzenith[m]> ifreund: Alright
<Shinyzenith[m]> thanks for the quick response ❤️
<ifreund> Shinyzenith[m]: also if you're still wondering why we require the generate("wl_foo", 42) calls in build.zig, see the commit I just pushed
<Shinyzenith[m]> Omw
<ifreund> the bug described in the commit message is still very possible with wayland-rs unfortunately, and I have infact written that bug with wayland-rs before :/
<Shinyzenith[m]> ifreund: after reading your commit I realized that I have done this in all of my tools
<Shinyzenith[m]> I just slapped on the max version I saw in the xml file :/
<ifreund> you're certainly not alone :/
<Shinyzenith[m]> I'll bring this up with wayland-rs devs and see if we can get a safer abstraction there too!
snakedye has joined #river
<ifreund> Shinyzenith[m]: fixed that bug, I love zig's std.ArrayHashMap :)
<Shinyzenith[m]> woah that was fast
<Shinyzenith[m]> 😆
<novakane> at one point zig-wayland gonna become the official way to use a scanner, so much improvement :P
notzmv has quit [Ping timeout: 260 seconds]
snakedye has quit [Ping timeout: 272 seconds]
snakedye has joined #river
<dnkl> thanks for the key bind fix! works perfectly again 🙂
hill has quit [Remote host closed the connection]
<ifreund> nice! you mostly have pmkap to thank for that one :)
notzmv has joined #river
snakedye has quit [Ping timeout: 272 seconds]
snakedye has joined #river
pkap has joined #river
<pkap> Is anybody using river on Ubuntu 22.04? How well does it work?
<ifreund> i would expect any issues if it has an up to date enough wlroots version
<ifreund> s/would/wouldn't/
<ifreund> I would in general recommend debian over ubuntu though
<pkap> Hm yeah it is up to date for now.
<pkap> I started a new job and I got an Ubuntu 22.04 workstation.
<ifreund> ah, nice!
<pkap> Yeah now I'm thinking how to best make it run with river. Wlroots is up to date now but probably not for long...
<ifreund> you can always run whatever the default thing work suggests on tty1 and river on tty2
<ifreund> hmm, yeah I'm hoping we can get wlroots released sooner rather than later, it's the only real thing blocking river 0.2.0
<ifreund> wlroots itself also tends to depend on quite recent libwayland versions, potentially recent mesa versions as well
<pkap> Ah nice :)
<ifreund> mesa is the only one that's not trivial to package yourself though
<ifreund> for zig you can just use the static tarball from the website though
mannerism has quit [Ping timeout: 248 seconds]
<pkap> Yeah the static zig download is great!
<ifreund> hopefully I'll figure out how to make that a thing for river too someday
<pkap> That'd be awesome :D
<ifreund> that's a extreemly long term goal though, don't get your hopes up :D
<pkap> :D I'm thinking to give nix a shot for building river
<ifreund> ah, yeah that'd probably work well
<ifreund> If you can stand the nix language that is :/
<pkap> Never tried it so far. Always wanted to but never did.
<pkap> But I really want to get river this ubuntu 22.04 workstation and also in a few month with the next wlroots release.
<ifreund> I've had moderate success using nix for similar things before, the tech is there but the docs sucks and the language is horrible IMO
<ifreund> if you can figure out how to use it well enough I'm sure it can do what you want
<pkap> Nice :D
<pkap> Has anybody tried this with river: https://github.com/any1/wayvnc ?
mannerism has joined #river
<Shinyzenith[m]> https://wayland.app/protocols/wayland#wl_output:event:name Sooo I got wl_output global from the registry and I set a listener to read it's events and I don't see wl_output::name anywhere.. geometry and the others show up
<Shinyzenith[m]> IIRC when I wrote the same app in rust, wayland-rs warmed me that you need xdg-output-unstable in your environment to receive wl_output::name and wl_output::description
<Shinyzenith[m]> I assume I need to do the same in zig? and since I don't see any "environment" concept like in wayland-rs here, what do I do?
<Shinyzenith[m]> * https://wayland.app/protocols/wayland#wl\_output:event:name So I got wl\_output global from the registry and I set a listener to read it's events and I don't see wl\_output::name anywhere.. geometry and the others show up
<Shinyzenith[m]> IIRC when I wrote the same app in rust, wayland-rs warmed me that you need xdg-output-unstable in your environment to receive wl\_output::name and wl\_output::description
<Shinyzenith[m]> I assume I need to do the same in zig? and since I don't see any "environment" concept like in wayland-rs here, what do I do?
<ifreund> Shinyzenith[m]: wl_output.name is only available since wl_output version 4, what version did you bind?
<ifreund> xdg_output is not related here
<Shinyzenith[m]> version 3
<Shinyzenith[m]> I'm pretty certain xdg-output- had something to do with it
<ifreund> so yeah, you need to bind version 4 to get the name event
<Shinyzenith[m]> bound to v4 and still no name event
<ifreund> could you paste the WAYLAND_DEBUG=1 log somewhere?
<Shinyzenith[m]> probably because the version of river I'm running is still on v3
<Shinyzenith[m]> ifreund: sure
<ifreund> [4079390.002] wl_registry@2.global(33, "wl_output", 4)
<ifreund> [4079390.049] -> wl_registry@2.bind(33, "wl_output", 1, new id [unknown]@5)
<ifreund> the server advertised version 4 and you bound version 1
snakedye has quit [Ping timeout: 276 seconds]
<Shinyzenith[m]> huh , how? I mentioned scanner.generate 4
<ifreund> the version you pass to generate() determines the code that gets generated
<ifreund> I'm talking about the number you pass to wl.Registry.bind()
<Shinyzenith[m]> Oh ok
<Shinyzenith[m]> Yep the name event is fired now
<Shinyzenith[m]> Thank you Issac1
<Shinyzenith[m]> * Thank you Issac!
<ifreund> no problem!
snakedye has joined #river
waleee has joined #river
pkap has quit [Quit: Client closed]
<novakane> ah I see my Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=1769457
<novakane> firefox >100 is really a shit show of regression
waleee has quit [Ping timeout: 248 seconds]
waleee has joined #river
londoed has joined #river
adamcstephens has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 260 seconds]
adamcstephens has joined #river
waleee has joined #river
waleee has quit [Ping timeout: 272 seconds]
qyliss has quit [Quit: bye]
qyliss has joined #river
snakedye has quit [Ping timeout: 260 seconds]
snakedye has joined #river
waleee has joined #river
snakedye has quit [Ping timeout: 272 seconds]
snakedye has joined #river
waleee has quit [Ping timeout: 272 seconds]
talismanick has joined #river
<mizzunet> Does anyone else have Waydroid? Does the layout becomes like when there's waydroid window for you?
<mizzunet> That is, the empty space and overlapping windows
amnesiacsardine has joined #river
<leon-p> mizzunet: that is caused by certain windows not being resizable. perfectly normal.
<leon-p> basically the layout does not care whether a window is actually resizable or not
amnesiacsardine has quit [Quit: Lost terminal]
<mizzunet> can I make it to behave normally?
<leon-p> it is behaving normally
<leon-p> if you are asking whether the layout generator can respect the min/max size of windows, then no
<leon-p> the layout in river isn't really a hard set in stone thing. It's more like a suggestion, especially wrt window size
snakedye has quit [Read error: Connection reset by peer]
snakedye has joined #river
waleee has joined #river
adamcstephens has quit [Remote host closed the connection]
spiralbundle has joined #river
<spiralbundle> I am trying to run river on Void linux. I am having a lot of difficulty simply getting it to run properly. When I run `river` I get a permission denied error. But I have the necessary permissions to run the init file, I've checked. The info states it's initializing a server with an x11 backend.
<spiralbundle> Why is it using x11 as a backend when river is a wayland compositor?
<spiralbundle> I'm new to wayland so and haven't worked much with the x11 system so I would appreciate help understanding how the river compositor works. Documentation is sparse as far as I can find
snakedye has quit [Ping timeout: 260 seconds]
snakedye has joined #river
<ifreund> spiralbundle: could you paste the error you are getting somewhere?
<ifreund> to confirm, are you running the river command from a tty?
<spiralbundle> I am running it from a tty
<ifreund> spiralbundle: that log suggests you aren't running it from a tty but rather from inside an X11 session
<ifreund> DISPLAY is set, so river tries to start as an X11 client
<spiralbundle> okay, I may be misunderstanding. I am using kitty from kde atm
<spiralbundle> is opening up a tty application inside a de just running an x11 client?
<ifreund> tty in this context means a raw linux tty, that is not inside any graphical session
<ifreund> you can use ctrl+alt+f1 to switch between ttys on linux
<ifreund> before you run river there though, make your init file executable
<spiralbundle> okay, I see. I have typically always run ttys inside a graphical session. If I were to run e.g. kitty in a wayland session would that also work? Or starting out should I try and run river from a raw linux tty?
<ifreund> spiralbundle: if you run river inside of an existing graphical session, it will start nested in that session as a normalish window
<ifreund> if that's what you want, feel free to run river that way, but you probably want to run it as the only graphical session
spiralbundle has quit [Ping timeout: 244 seconds]
spiralbundle has joined #river
<spiralbundle> ifreund I tried running it from a raw tty
<spiralbundle> very basic question, but for future reference is there a way to kill a river compositor session in the same way that ctrl+alt+backspace can kill an x11 session?
<ifreund> spiralbundle: you can switch to a different tty (ctrl+alt+f2 or whatever f key) and then run killall river
<ifreund> if river's crashed or something's gone wrong and switching ttys doesn't work, your last result is to use sysrq r to put the keyboard into "raw" mode, taking control away from river
<ifreund> with the keyboard in raw mode switching ttys will work as it's then handled by the kernel
<ifreund> s/result/resort/
<spiralbundle> okay, ty. I got stuck in a river session and had to restart xD
<spiralbundle> so the server is starting, but I'm getting an error regarding the modifier keys. But I have tried different namings, from super to logo to Mod4, and even 'Alt' is returning invalid
<spiralbundle> for convenience I'm just attempting to run it within x11, but I get an identical error on a raw tty
spiralbundle has quit [Ping timeout: 240 seconds]
spiralbundle has joined #river
<NickH> spiralbundle: that pastcode.io link returns a 404 error.
<Shinyzenith[m]> Forgot to mention this earlier but recently I've been having a lot of crashes in river when closing tabs in chromium
<Shinyzenith[m]> Didn't get time to check the logs, will check tomorrow when I get off work and send it here
<Shinyzenith[m]> Just wanted to check if I'm the only one.
<NickH> What version of river are you running?
<Shinyzenith[m]> Im currently afk so I can't get the exact version for you but i believe I'm using river git from aur
<Shinyzenith[m]> Will send that tomorrow with the crash logs
<NickH> Sorry, that question was for spiralbundle
<Shinyzenith[m]> Oh sorry!
<spiralbundle> I am running 0.1.1
<NickH> Ok, then you need to use Mod1 isntead of Alt
<NickH> And Mod4 instead of Super
<NickH> The "Alt" and "Super" aliases were introduced some time after 0.1.1.
<spiralbundle> NickH okay, so that fixed the modifier errors. But all I get is still a blue/green blank screen when I start river
<spiralbundle> Is that the normal default?
<spiralbundle> when I exit out, it tells me (EE) failed to read Wayland events: Broken pipe
<NickH> Blank blue/gree screen is what you should expect.
<NickH> Make sure you have a keybinding setup to open a terminal emulator.
<NickH> Default keybinding to exit is "Mod4+Shift e"