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 has quit [Quit: leaving]
waleee has quit [Ping timeout: 255 seconds]
peregrinator has quit [Quit: Connection closed for inactivity]
elshize has joined #river
elshize has quit [Quit: WeeChat 3.0.1]
snakedye has quit [Ping timeout: 255 seconds]
novakane has joined #river
snakedye has joined #river
<novakane> so I make removing border works, but now I need to add it back when there is more than one window
<novakane> is there a way to get the border-size from the config?
novakane has quit [Quit: WeeChat 3.2]
novakane has joined #river
<ifreund> novakane: no, I'd probably implement that as a CLI arg for your layout generator
<novakane> ifreund: thanks, I'll try that
<novakane> I'm gonna try with a hard coded border size before I think, to see how well it works
snakedye has quit [Ping timeout: 240 seconds]
leon-p has joined #river
waleee has joined #river
snakedye has joined #river
snakedye has quit [Ping timeout: 240 seconds]
noopdecoder has joined #river
elshize has joined #river
noopdecoder has quit [Quit: noopdecoder]
noopdecoder has joined #river
<ifreund> urgh, we get a crash on output destroy with the cursor fix
<leon-p> huh, I actually saw the segfault in the terminal, I just assumed it was some client that couldn't handle a sudden connection loss...
<ifreund> I also found another bug when I went to remove the checks blocking toggling e.g. fullscreen for a view currently being moved
<ifreund> I've got a fix in the pipeline though
<ifreund> also decided to take some time today to improve the consistency of the rendering code
noopdecoder has quit [Quit: noopdecoder]
noopdecoder has joined #river
<novakane> ifreund: why the -version flag should be a build option?
<ifreund> novakane: we shouldn't expose it as a zig build -Dfoo flag, but it should be defined in a single place in the build.zig
<ifreund> does that clear things up?
<novakane> oh ok yeah, like just the function would be in build.zig but that's not intended for a user interaction
<ifreund> yep
<novakane> I was confused when I saw build options I thought you want a flag to build river to a specific version
<ifreund> I was just talking about the @import("build_options") thing
<novakane> yeah makes sense now
<ifreund> pushed out some refactoring that should thoretically fix things but who knows if I screwed it up :D
noopdecoder has quit [Quit: noopdecoder]
<ifreund> won't fix that crash the cursor reset state thing introduced yet
<ifreund> I got sidetracked when I saw other wrong stuff
<leon-p> ifreund: "including the git commit hash in dev versions would be nice" if done wrong can break if river is distributed. In LavaLauncher, I currently have a check that if the build is done in a git repo, the commit hash is used as version, otherwise a predefined string, which I thought would work because packagers ususally download release tarballs, but in reality breaks because some packaging systems
<leon-p> unfortunately have the build-root inside the git repo of the package build script.
<leon-p> and it breaks in a very unfortunate way: it shows the git commit has of the repo the build script is in, not the project repo
<leon-p> So maybe instead of automatically detecting it, we should have a `release: bool` variable in build.zig?
<ifreund> hmm, yeah that doesn't sound good
<ifreund> I just realized that our pointer constraints implementation is flawed though so I'm going to go fix that real quick
<novakane> zig use the commit hash in `zig version` command though so it should be possible no?
<ifreund> anything's possible
<ifreund> and yeah, looking at the build.zig for zig itself might be a good place to start
<novakane> yeah that what I was reading, I guess we could make something similar and see if everything break or not :P
<ifreund> copying blindly isn't going to get us very far
<novakane> hmm there is another way to write code? :P
<ifreund> ok, I'm not fixing pointer constraints today, I don't care enough about it :D
<ifreund> I opened an issue though
<novakane> so I'm trying river -version, wouldn't it makes sens to use '-v' for consistancy?
<ifreund> novakane: I think I want -help and -version for everything, removing any inconsistencies that currently exist
<ifreund> no more bare -h
<ifreund> but we should always print the usage string on an unrecognized argument
<novakane> ifreund: what about -l and -c?
<ifreund> -c should stay as-is for sure
<ifreund> I've been considering exposing fewer log levels (only debug, info, warn, error) so the argument of -l might change. -log-level wouldn't hurt either
<ifreund> -c is consistent with sh -c which I like
<novakane> allright, well that's could be change after, anyway I kinda make it works like zig version, though I'm not sure git hash works without a first tags
<ifreund> git rev-parse HEAD
<ifreund> or git rev-parse --short HEAD
<leon-p> if we have the hash in the version string, we probably also want the branch
<ifreund> branch doesn't matter
<ifreund> branches are literally just names for a specific hash
<leon-p> git rev-parse true, but it makes it possible to see from what branch a binary was build without having to look at the repo
<leon-p> oops, I mixed a command and a message :P
<ifreund> the branch doesn't matter though, only the commit hash does
<ifreund> even if you can see that they built from whatever their branch called master was, it could be a wildly different commit that the current head of your master
<novakane> ifreund: what I mean is zig use git describe, and use an ancestor tags variable, so currently like that without a 0.1.0 release it only display 0.1.0 but after the release it should display 0.1.0-dev.xxxx
<ifreund> git describe won't work without any tags
<ifreund> git rev-parse --short HEAD is far simpler too
<ifreund> just hardcode the version in a constant in the build.zig, far simpler than parsing git describe output
<leon-p> ifreund: actually my proposal was a bit more selfish than knowing what version other people use. I want to know from what branch _I_ build :D But I agree it isn't strictly necessary
snakedye has joined #river
<emersion> note, tarballs don't have .git
<leon-p> not only that, but depending on how a distribution builds packages, the tarball might be downloaded into a git repo and the git command will pick up that repository
<emersion> eh, fun
<ifreund> so what, we check for .git in the build root?
<emersion> GIT_WORK_TREE might come in handy
<leon-p> or we just have a `release: bool = true;` in build.zig.
<leon-p> anyway, brb, gotta walk the dog
snakedye has quit [Ping timeout: 252 seconds]
<ifreund> emersion: thanks for th tip
<ifreund> novakane: looks like passing --git-dir and --work-tree arguments to git will be foolproof
<ifreund> git --git-dir $BUILD_ROOT/.git --work-tree $BUILD_ROOT rev-parse --short HEAD
<ifreund> where $BUILD_ROOT is b.build_root in our build.zig
snakedye has joined #river
elshize has quit [Quit: WeeChat 3.0.1]
<novakane> allright I'll use rev-parse then
snakedye has quit [Ping timeout: 265 seconds]
<ifreund> leon-p: found and fixed that crash by the way, it was destruction order of course
<novakane> so hmm how should I format this so the git command works https://zigbin.io/517788
<novakane> like this there is space between b.build_root and '/.git' if I understand correctly
<ifreund> novakane: yeah, you'd need to pass them a single argument there
<ifreund> see std.path.join
<novakane> thanks I'll look into it
<ifreund> alright, I think I'm done for the day. Feeling a lot better about the cursor and rendering code now
<ifreund> pointer constraints are still incomplete and there's that issue with super high dpi mice as we use integers for view location not f64s
<ifreund> but overall it feels a lot more solid
<ifreund> maybe I should fix that DPI thing though, it would be cool to release river 0.1.0 with 0 known bugs
<ifreund> well, aside from xwayland BS that is
<ifreund> but I consider perfect xwayland support out of scope
<ifreund> and nobodies reported any issues with it in a while somehow
<leon-p> ifreund: do you have a high-dpi mouse to test the code?
<ifreund> nope :D
<leon-p> well I have one, I just would not know how to approach this :D Also I could never reproduce...
<ifreund> but I can see why our current approach might be problematic
<ifreund> if the delta motion of pointer events causes the moving/resizing view to move less than a pixel we effectively round that down to 0 movement
<leon-p> Ah, makes sense
<ifreund> and so if your mouse sends a lot of really tiny delta events, it won't move the view at all
<ifreund> anyhow, I'm off for the day and probably won't have much if any time for river tomorrow, if you want to work on it feel free to give it a shot
<leon-p> I'll have a look
<ifreund> :)
<novakane> ifreund: what do you think? https://zigbin.io/cc0eb1
<leon-p> novakane: is there a reason the version string isn't just a hardcoded []u8 ß
<novakane> no you're right that's was for the first version based on zig itself
<leon-p> novakane: what do you think about https://zigbin.io/62c1c6 ?
<leon-p> with os.access you can check if .git exists before calling the git command
<leon-p> actually, b.execAllowFail() in my example should not be try'd, but rather `catch return b.fmt("{s}-dev", version);`
<leon-p> it is certainly possible that .git exists, but the git command is not available, in which case we should still have `-dev` in the version string
<novakane> yeah it look good, it make it more safe
<novakane> though how you would have .git without git command since you need to init the submodules
<leon-p> that's a good point
<leon-p> huh, how do distributions build projects using submodules when the policy usually is to download release tarballs instead of cloning repos?
<novakane> no idea
notzmv has quit [Ping timeout: 276 seconds]
<leon-p> ifreund: one of your recent commits re-introduced the bug that caused me to work on cursor state resetting :D
<leon-p> the cursor image once again only updates when the pointer is moved
snakedye has joined #river
snakedye has quit [Ping timeout: 245 seconds]
novakane has quit [Quit: WeeChat 3.2]
notzmv has joined #river
snakedye has joined #river
Guest38 has joined #river
Guest38 has quit [Client Quit]