ifreund changed the topic of #river to: river - a dynamic tiling wayland compositor || https://github.com/ifreund/river || channel logs: https://libera.irclog.whitequark.org/river/
<leon-p> ecocode_: not yet
<ecocode_> hmmm
<ecocode_> well, I think I can live with this for now
xd1le has joined #river
snakedye has quit [Read error: Connection reset by peer]
snakedye has joined #river
leon-p has quit [Quit: Lost terminal]
waleee has quit [Ping timeout: 260 seconds]
ext0l has joined #river
snakedye has quit [Ping timeout: 252 seconds]
Guest48 has joined #river
Guest48 has quit [Client Quit]
pete11 has joined #river
<pete11> Can I somehow make the river tags in Waybar clickable. So that I can switch tags by click.
snakedye has joined #river
pete11 has quit [Quit: Client closed]
leon-p has joined #river
<bfiedler> Are triple-slash comments semantically different from double-slash comments? I see them used in the river code quite a bit
<leon-p> bfiedler: tripple-slash comments are doc-comments
<leon-p> so yes, they are different. And zig won't allow them in places where doc comments don't make sense.
<bfiedler> leon-p: thanks!
<bfiedler> Should a theoretical set-position x y be relative to the current output or absolute?
xd1le has quit [Quit: xd1le]
<leon-p> bfiedler: relative to the current output.
<leon-p> and also it must follow current convention by never moving a window outside an output
<bfiedler> leon-p: makes sense :)
snakedye has quit [Ping timeout: 252 seconds]
<bfiedler> riverctl resize <direction> moves the output by effective_delta / 2 to make it a bit more natual
<bfiedler> Should a riverctl set-geometry command do that as well?
<leon-p> bfiedler: Good question. I think it should not.
<leon-p> The two commands have different use cases
<bfiedler> Me neither
<bfiedler> It makes it _much_ easier to use in conjunction with set-position
snakedye has joined #river
<leon-p> the resize by delta command is meant for interactive use. Moving the view so it appears like its center remains stationary is just good UX. However the set-geometry and set-position commands are meant for precise control and this feature would just be annoying here.
<bfiedler> is it guaranteed for a view that x_pos < effective_output_width - border_width >= 0?
<bfiedler> s/>= 0//g
<leon-p> bfiedler: no. Layout generators currently have no restrictions on where to place windows and therefore can position them outside the bounds of the output.
<bfiedler> what should happen when setting the geometry of an off-screen view?
<bfiedler> should we pull the view into focus
<leon-p> bfiedler: since it is set to floating, it should be pulled into the output bounds
<leon-p> going even further, I think these restrictions should apply to layout generators as well
<bfiedler> leon-p: that or let it be a protocol error
<leon-p> bfiedler: sounds reasonable. I'll open an issue about that
<bfiedler> The case that currently bugs me is the following: calling 'set-geometry w h' on a window that is placed at something like 2px from the lower-right corner. what should happen here?
elshize has quit [Ping timeout: 265 seconds]
<bfiedler> I want to move the position of the window as little as possible, however I have to move it since otherwise the box would be too small
elshize has joined #river
<leon-p> I see two possible things to do: 1) keep the position and resize the view to min(possible_size, desired_size), or 2) move the view
<leon-p> and perhaps 3) print an error and abort the operation
<leon-p> which of these makes more sense depends on the use case I think
novakane has joined #river
<bfiedler> I prefer 1), but this leads to cases where we might place parts of views outside of the output bounds
<bfiedler> 3) sounds good in this case
<leon-p> well, any part of the view being outside the output bounds is a complete no-go.
<leon-p> tbh I think there should be some unified View.moveResize() function that takes care of all the constraints, so we don't have to worry about it anymore in the future
<bfiedler> leon-p: +1 for moveResize, that's what I'm basically working on anyway ATM
<bfiedler> but then we have to decide what get's preference: the position or the geometry
<novakane> does view could be place between two outputs? since I don't have multiple monitors I don't know what's the current behavior
<bfiedler> I think it shouldn't be possible at the moment
<bfiedler> Is 2 * border_height < min(output.width, output.height) checked?
<bfiedler> that looks like it makes sense (maybe only with <= but nonetheless)
<leon-p> bfiedler: a view is constrained to an output even if there is another output next to it.
<leon-p> (not handling this case is one of the technological reasons for this restriction, btw.)
<leon-p> bfiedler: can't remember what's checked where, sorry
waleee has joined #river
<bfiedler> resizing a window is actually resize-move
<leon-p> bfiedler: depends on the direction, but yes
<bfiedler> hmm
<bfiedler> I'm thinking of ways to unify the resizing handling, but it is not clear how to do it
<leon-p> yeah, it's a bit annoying. Be happy this is Wayland. On X it's not even possible to do that in a reliably frame-perfect way.
<bfiedler> riverctl resize would like a resize which can temporarily go outside of the view borders since it fixes itself by "centering" the move afterwards
<bfiedler> however set-geometry would like a resize which automatically clamps at the output bounds
<leon-p> bfiedler: it also allows to have a size bigger than the output dimensions and fixes itself afterwards AFAIK
<bfiedler> yeah if size > output_width then it gets clamped by the available width
<leon-p> what if you approch the problem from the POV of positioning two points on the output, the upper-left and lower-right corner, keeping both inside the bounds? Then both geometry or position overrule the other based on position. Perhaps that is abit more intuitive
<leon-p> bfiedler: ^
<leon-p> I used that method in my pointer resize PR and it works great there.
<bfiedler> sure, but the question is still: what if moveResize cannot handle it's arguments? should x/y positioning be retained and width/height truncated or should width/height be retained and x/y changed?
<leon-p> bfiedler: that's the point. My idea is to covert x,y,w,h into two sets of x,y and treat them individually.
<leon-p> whether dimensions or position is corrected then depends on which of the points moves outside of the bounds
<leon-p> that will ensure that the size of the view is exactly the size of the visible part of the view if it /could/ be moved outside the bounds, with the expection of the minimum view size
<bfiedler> what if minimum size comes into play?
<bfiedler> i.e. resizeMove (999, 999, 100, 100) on a 1000x1000 display
<leon-p> I think For min size the best way is to first calculate the new size and position, then if necessary correct the size and then if necessary correct position. Min size will usually never be encountered, so it's fine if it introduces a slight inconsistency IMO
<leon-p> same for the xdg toplevel min size
<leon-p> Or to explain it in simple words: "if you push the window into a border, the border eats that part of the window, until the window can get no smaller, then it bounces back"
<bfiedler> agree
<bfiedler> but then, this is unintuitive for move right
<leon-p> how so?
<bfiedler> It is nicer to have the window stop at the right border if I want to snap it right
<bfiedler> ah but then I could just have used snap
<leon-p> ah, that is what you mean. My proposal actually only applies to move-resize ops., not to pure move ops.
<bfiedler> ah, my bad
<leon-p> fore pure movement I don't think windows should be resized at all
<leon-p> should have pointed that out prbably
<bfiedler> makes sense
<leon-p> also pointer resize/move still needs to be special-cased, as they are right now.
<leon-p> I think at least.
<bfiedler> what about set-position vs move
<leon-p> good question. And TBH I don't have an answer.
<bfiedler> move should not change the window size, but I feel like set-position should have the border-eats-up-extra-window behaviour
<leon-p> I can get onboard with that
<bfiedler> I feel like that is the best tradeoff between precision and intuition
<leon-p> you know, we could always wait until monday and defer the decission making to ifreund :D
<leon-p> anyway, I think this requires more discussion
<bfiedler> +1
<bfiedler> I'll let it rest until Mo then :)
<leon-p> especially with regards to usecase. Something that is used interactively should behave differently than something that is used through scripts / a wayland client
leon-p has quit [Quit: leaving]
elshize has quit [Ping timeout: 252 seconds]
elshize has joined #river
<bfiedler> Alright, I've added a comment to my (now WIP) PR: https://github.com/ifreund/river/pull/430
snakedye has quit [Ping timeout: 260 seconds]
snakedye has joined #river
novakane has quit [Quit: WeeChat 3.2.1]
ext0l has quit [Ping timeout: 260 seconds]
elshize has quit [Ping timeout: 260 seconds]
elshize has joined #river
emersion has quit [Ping timeout: 240 seconds]
emersion has joined #river
swl has joined #river
<swl> How can I set my keyboard layout using riverctl? In sway I could do 'input '*' xkb_variant colemak' but I don't see any reference to xkb or any keyboard related command in riverctl(1)
<inclement> I think you can use the env vars $XKB_DEFAULT_LAYOUT etc., I think the river man page explains more
swl has quit [Quit: Lost terminal]
snakedye has quit [Ping timeout: 252 seconds]
snakedye has joined #river
<ecocode_> @swl you need to modify ```/usr/share/wayland-sessions/river.desktop```
<ecocode_> hmm, he already left :)
snakedye has quit [Ping timeout: 260 seconds]
snakedye has joined #river
ext0l has joined #river
mov_eax has joined #river