ChanServ changed the topic of #river to: river - a dynamic tiling Wayland compositor || https://codeberg.org/river/river || channel logs: https://libera.irclog.whitequark.org/river/
mekeor has quit [Quit: fuck trump and all other misantropic warmongers]
twelve has quit [Remote host closed the connection]
sentry has joined #river
Snetry has quit [Ping timeout: 252 seconds]
andycs0 has quit [Ping timeout: 248 seconds]
Szadek727 has quit [Quit: off]
Szadek727 has joined #river
apoorv569 has quit [Ping timeout: 244 seconds]
apoorv569 has joined #river
lordmzte has quit [Quit: Ping timeout (120 seconds)]
lordmzte has joined #river
notchoc has quit [Ping timeout: 252 seconds]
aktina has quit [Ping timeout: 252 seconds]
aryak has quit [Ping timeout: 276 seconds]
Keeto has joined #river
aryak has joined #river
notchoc has joined #river
aktina has joined #river
Keeto has quit [Ping timeout: 252 seconds]
Szadek727 has quit [Quit: off]
Szadek727 has joined #river
twelve has joined #river
Ireozar has quit [Ping timeout: 252 seconds]
Ireozar has joined #river
letherlick has joined #river
Keeto has joined #river
dbuckley has joined #river
letherlick has quit [Quit: Client closed]
letherlick has joined #river
dbuckley_ has joined #river
dbuckley has quit [Ping timeout: 260 seconds]
dbuckley_ is now known as dbuckley
Keeto has quit [Ping timeout: 272 seconds]
letherlick has quit [Ping timeout: 272 seconds]
Nickli has quit [Ping timeout: 268 seconds]
Nickli has joined #river
Szadek727 has quit [Quit: off]
Szadek727 has joined #river
twelve has quit [Ping timeout: 260 seconds]
Guest68 has joined #river
Keeto has joined #river
zuki has joined #river
<zuki> I'm trying to extend the layout generator at https://codeberg.org/river/river/raw/branch/master/contrib/layout.c, I'm running into a issue of my layout_handle_user_command_tags function not being called even though its in the river_layout_v3_listener struct (as `.user_command_tags = layout_handle_user_command_tags,`). I'm not sure what I'm missing.
<zuki> paste bin of the modified layout.c https://pastebin.com/GEwKWf1R.
<leon-p> zuki: you can run any wayland client, including your layout generator, with WAYLAND_DEBUG=1 in the env to see debug output
<leon-p> this allows you to see if the event is even send
<leon-p> although your printf() call in the user command handler is commented out
<leon-p> if you f.e. fprintf(stderr, ">>> %s\n", _command) in layout_handle_user_command() (before the early returns), you should see something
<zuki> I should have removed that to avoid confusion the problem is the printf() call in layout_handle_user_command_tags never runs
<leon-p> well, in that was a later addition to the protocol
<leon-p> make sure you bind the right version
<leon-p> in your registry handler, you bind version 1 of the layout protocol, you need version 2
<leon-p> if you look at the event in the spec (river-layout-v3.xml) you'll find the since="2" attribute
<zuki> thanks so much
<leon-p> no problem :)
<leon-p> but since you are already in the mood for writing a layout generator, maybe take a look at pull request 1100, which replaces the layout protocol with a full window management protocol
<leon-p> a bit more involved but also a lot more fun
<zuki> I've heard about that pull request but haven't given it a proper look It sounds like it would be fun.
<zuki> Is the pull request in a state were it usable?
<leon-p> almost. it's enough to play around with (I have an experimental WM I am working on) but some less important events aren't wired up yet
<leon-p> you can even do custom window decoration now!
<zuki> holy shit, that's really cool!
<leon-p> yeah the custom UI stuff turned out to be a lot more fun than playing around with just window management :)
<ifreund> fyi, we might need to move to wl_fixed or similar for coordinates eventually to make fractional scaling good
<leon-p> ugh
<ifreund> I'm not sure if it will be possible to do things entirely on the compositor side or not
<zuki> whats wrong with fractional scaling on wayland aside from xwayland?
Guest68 has quit [Quit: Client closed]
<leon-p> the question of how to round coordinates mostly, from my PoV
<ifreund> zuki: right now wlroots uses position-dependant scaling which can lead to buffers being blurry due to being stretched by 1 pixel in order to avoid a gap e.g. between a window and its border
<ifreund> there is draft work for wlroots/sway to use position independant scaling which eliminates that problem
<ifreund> but it relies on sway positioning all its scene nodes such that they align with the pixels of the output they will be rendered on after scaling
<leon-p> I'd personally be fine with any approach as long as it doesn't lead to gaps in my window decoration. moving the entire window node tree to align with physical pixels is fine IMO
<ifreund> the problem is more the positioning of the decoration surfaces relative to the xdg_toplevel's surface
<ifreund> maybe there's a way we can keep using nice abstract integer logical coordinates in the rwm protocol and do something fancy to fix things up on the compositor side
<ifreund> that's a serious research project though, I don't know if anyone's ever done that before
<leon-p> I am also fine with stretching decoration surfaces by a pixel. Although I am biased here, since that's how my decoration works anyway I guess...
<ifreund> my current plan is to just keep the protocol as-is for now and come back to this after I have some non-trivial wm's to test with
<ifreund> leon-p: stretching decorations surfaces by a pixel would make them blurry...
<leon-p> Hmmm...
<leon-p> I guess that's an inherent problem with wayland scaling model. Rather than giving a scale (whether integer or multiple of 1/120 is irrelevant), it might be better to just have the server communicate the exact pixel size for the rendered buffer...
<ifreund> I don't think that would solve this problem, the protocol already is telling the client an exact pixel size
<ifreund> it just communicates it as a scale from one protocol + a configure event from a different protocol
<leon-p> well, I'll leave the scaled coordinate fun to others
<leon-p> I'll use whatever solution works and is considered canonical
<Nickli> leon-p, that border reminds me a little of the ones in BeOS/HaikuOS
<leon-p> Nickli: it's mostly inspired by motif and CDE, but a lot of toolkits in that era had a similar style
<leon-p> I also plan on supporting decoration style inspired by windowmaker / nextstep and a few custom ones. It's fairly simple to add new styles, the hard part is coming up with them :)
<leon-p> I initially wanted to allow users adding a custom bitmap as decoration texture, but that wouldn't work well with scaling :/
<Nickli> there were a lot of them back in gtk2/3
<leon-p> yeah, but I am only interested in the ones that look goot :)
<leon-p> *good
<leon-p> it's also limited in the way that the decorations can't have any change along the axis parallel to the window-side they are attached to, since it's a fixed-size texture that gets stretched
<Nickli> guess World of Warcraft or Warcraft 3 like border decorations are out of the question then
<leon-p> not if you implement your own WM 🤷
<leon-p> currently experimenting with replacing chickens cheme with s7 since it's a lot more friendly to being used embedded in another program and it add 41MB to a debug build, holy hell
<leon-p> a release build is somehow smaller than a release build with chicken, but also two minutes slower...
<leon-p> experiments will continue to see if this is a good idea
<bitblt> my dream is that at some point an embedded or native dialect of clojure will appear and we can start using that for scripting
<bitblt> i've used s7 around 10 years ago for scripting in game development and had some issues that i cannot remember fyi
<leon-p> I'll find out soon if it works for me. The main reason I want to try it is because it allows me to define scheme procedures from zig. With chicken I have to expose a C ABI function and write chicken bindings for that function. If I can parse arguments to some of the procedures I expose directly in zig, I can drop a lot of code including the C header file which defines a few enum to make chicken happy which are fully redundant with the internal zig enums and a
<leon-p> pain whenever I want to add anything new
<__toor__> is there a way to make windows not allowed to move under the potential menubar?
<__toor__> I am experimenting with floating windows and when I move them I would like it to not go under the waybar on the top
<leon-p> you mean with current river (not rwm)? Then no
<__toor__> sorry, I have been away for a while rwm is a neu river?
<leon-p> rwm is basically "layout generators are cool, but what if they were proper window managers?"
<__toor__> I am on river 0.3.5 (or at least riverctl -version is that)
<leon-p> yeah, in that case there is no way to restrict window movement like you want. it should be possible to hack that in though, since that area is computed already as the usable area for layouts
<__toor__> is that something that rivertile handles? perhaps I could give it a try then if its fairly isolated
<leon-p> it's internal to river
<leon-p> ah, s7 just outright segfaults when compiled with zig, nice! guess I'll stay with chicken for now
rozo_dru has joined #river
<__toor__> chicken scheme?
<__toor__> scheme is a beautiful language in its own way. but i dont see why people insist on using it outside academia. Lua or Javascript is right there :D
rozo_dru has quit [Remote host closed the connection]
zuki has quit [Quit: Client closed]
Keeto has quit [Quit: Lost terminal]
zuki has joined #river
Keeto has joined #river
<leon-p> writing scheme is more fun than writing lua or js
<leon-p> however integrating scheme with other code which interfaces with the real-world
talismanick has joined #river
Keeto has quit [Remote host closed the connection]
<ifreund> bitblt: Im doing my stuff in janet, which is quite similar to clojure I believe (never used clojure)
zuki has quit [Quit: Client closed]
<ifreund> A taste of the janet Wayland bindings I made ^
<ifreund> Also there is a native clojure dialect called jank
<bitblt> this seems nice
<ifreund> It wasnt that mature last time I looked though
<bitblt> but clojure is on a whole new level as a better language in general :)
<bitblt> (although kinda hard for people that arent into pure functional stuff)
<ifreund> bitblt: what does clojure have that janet doesn't? It definitely seems like a far more popular/mature ecosystem but the janet language doesn't seem to be missing anything major from my perspective
<bitblt> you won't see any difference in simple usages
<bitblt> but when things start getting more complex, the combination of immutable data structures with its standard library is extremely powerful
<ifreund> bitblt: janer has immutable data structures and the standard library has quite nice functional programming APIs fwiw
<ifreund> I can confirm that that combination is very comfy for high level code
<ifreund> I do think you're right that clojure leans heavier into immutable data though
letherlick has joined #river
<ifreund> I should try it out at some point
<bitblt> It does have immutable data structures? I didn't remember that
letherlick has quit [Ping timeout: 272 seconds]
aryak has quit [Ping timeout: 245 seconds]
aryak has joined #river
jubilee has joined #river
jubilee has quit [Client Quit]
talismanick has quit [Ping timeout: 260 seconds]
twelve has joined #river
twelve has quit [Remote host closed the connection]
mekeor has joined #river
Szadek727 has quit [Quit: off]
Szadek727 has joined #river
twelve has joined #river
mekeor has quit [Quit: towards emacs as interface to cybernetic council communism]
twelve has quit [Remote host closed the connection]