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/
Guest17 has quit [Ping timeout: 252 seconds]
pmnw has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
lxsameer has quit [Ping timeout: 240 seconds]
waleee has quit [Ping timeout: 255 seconds]
snakedye has quit [Ping timeout: 260 seconds]
pkap has joined #river
lxsameer has joined #river
kraem has joined #river
talismanick has quit [Ping timeout: 276 seconds]
<kraem> hi! would it be possible to implement a mode for `focus-follows-cursor` where the focus is _always_ following a view? right now one can get in a state where the mouse is hovering view 1 but the focus is on view 2 and one needs to drag the mouse out of view 1 and in again to actually bring it into focus
<kraem> let me rephrase that: implement a mode where the focus is _always_ on the view the mouse is hovering
<ifreund> do you want it to prevent moving keyboard focus to other views with e.g. a keybind?
<kraem> i'm not sure. i'm trying to figure out when i get in the state mentioned as we speak
<kraem> ok so when scenario where it happens is i open firefox, restore the session and have my mouse on the right hand side. the focus will be on the left view (master) and not on the right view
<kraem> if that makes sense
<ifreund> yeah, new views always get keyboard focus if visible
<kraem> alright. so i guess what i'm asking for wouldn't be trivial to implement?
<ifreund> I mean, anythings possible :D
<ifreund> you could probably get the behavior you want by commenting out this line: https://github.com/riverwm/river/blob/2df2151afab926999c8ccca26c5870641eab0d69/river/Seat.zig#L339
<ifreund> I don't think I want to add a config option for that specifically though
<ifreund> Eventually river should be a lot more scriptable and users will be able to make this kind of policy decision without needing to change river's code
<ifreund> we're not there yet though
<kraem> anything's possible, but everything's not desirable ;)
<kraem> cool i'll comment out that line and try it out :)
<ifreund> to be clear, commenting that out should stop giving keyboard focus to new views
<ifreund> and if you then never use keybindings to change keyboard focus I think everything should work as you like :D
<kraem> oh alright, that won't cut it hehe
<kraem> what other focuses are there than keyboard? is keyboard focus = focus-view?
<ifreund> yeah, and pointer focus is whatever you move your cursor over
<kraem> reading leon-p's blog post about river he only mentions one typ of focus. but i guess that's keyboard focus?
<kraem> ok thanks
<ifreund> yeah an unqualified "focus" means "keyboard focus" in general
<ifreund> to see that they are distinct, note that you can e.g. scroll in firefox with the scroll wheel without firefox having keyboard focus
<kraem> ah i see. so i guess what i'm asking for is keyboard-focus always following the pointer-focus
<ifreund> I guess I wouldn't be opposed to a focus-follows-cursor mode that causes any cursor movement to give keyboard focus as an alternative to only on moving the cursor between views
snakedye has joined #river
<ifreund> kraem: that behavior's actually trivial to implement now since I last refactored this code: https://github.com/riverwm/river/tree/focus-follows-always
<ifreund> if that 'always' mode is something you'll use I'm happy to push that to master
<nor[m]> There are a few things in riverctl that can be toggled, but not set. What I mean: there is toggle-{float,fullscreen} but no [un]set-{float,fullscreen} and there is {set,toggle}-{focused,view}-tags but no {add,remove}-{focused,view}-tags (the additional tag commands would allow to add or remove some tags without changing nor knowing the state of the other tags).
<nor[m]> Is there a reason for that? Might just be my awkward usecases again and no one else ever needs that though xD
<kraem> ifreund: thanks! let me build that branch and see if it's what i want :)
<ifreund> nor[m]: no strong reason, no. Most of these commands are just what I wanted keybindings for in the early days of river
<ifreund> what's your use-case for add/remove?
<nor[m]> Example usecase for remove-focused-tags: Lets say I have 10 Tags as workspaces or "normal" tags and 10 tags as scratchpads. Now I want to hide all scatchpads at once (remove Tag 11-20) without bothering which scratchpads are currently active or not and without bothering what regular workspace I'm on (keep tag 1-10 as they are).
<nor[m]> The other ones are not as useful probably. I mentioned those more for completeness sake / theoretical thoughts on tags. I did wish for these sometimes, but these were really situations where set followed by a few individual toggles did the job perfectly well.
<nor[m]> I'd definetly map them if they existed, but I won't really miss them if not tbh xD.
snakedye has quit [Read error: Connection reset by peer]
snakedye has joined #river
<leon-p> ifreund: didn't we already have an "always" setting for focus-follows-cursor at some point? IIRC we removed for some reason.
<ifreund> nor[m]: I'd be fine merging a PR adding those as the maintenence burden is quite low. The code is all in https://github.com/riverwm/river/blob/master/river/command/tags.zig
<ifreund> leon-p: yeah, I think I nuked it because it was buggy before I fixed some underlying problems in the focus follows cursor stuff and I wasn't aware of anyone using it
pkap has quit [Quit: Client closed]
<kraem> ifreund: the patch works as i wanted it. i just need to start a mouse movement for the focus to kick in, but it's better than normal imo :)
pkap has joined #river
<ifreund> kraem: yeah, that's intended. Just pushed it to master :)
<nullndvoid[m]> I'm trying to write a simple wayland client application, I took a look at the hello wayland example but I have some questions from looking at example wayland client apps... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/21cc6813a8f0feb736c3d75f092c4fafdb3bceef)
talismanick has joined #river
<kraem> ifreund: thanks!
talismanick has quit [Ping timeout: 246 seconds]
draak has joined #river
Sasaigo has joined #river
<novakane> nullndvoid[m]: @This() makes the file a Struct, so instead of a foo.zig with a `pub const Bar = struct{};` you just have Bar.zig
<nullndvoid[m]> I know that but why do you make files into structs?
<novakane> because it's just nicer to use if you only have one struct in the file, just having `const Bar = @import("Bar.zig");` instead of `const Bar = @import("foo.zig").Bar;`
<ifreund> files are always structs, using @This() just gives you access to that type
Sasaigo has quit [Quit: Client closed]
<ifreund> and it's just a style choice, feel free to do whatever
<nullndvoid[m]> also about zls, do you manage to get any completions using zig-wayland because I believe that comptime code I sent works for most packages
<novakane> the function names are differents because it makes the bindings nicer to use with a pointer as the first function args
<novakane> but zlw works for me I think
<novakane> maybe not autocomplete though
<nullndvoid[m]> I enever seem to get any type, function completions, I can't even hover for function signatures or get the definitions
<ifreund> either your zls is misconfigured or its a zls bug
<nullndvoid[m]> is there an entrypoint/main file in the bindings? I might try adding that comptime snippet
<ifreund> that's irrelevant
<nullndvoid[m]> ifreund: yeah its always been awkward with package completions for me, I might try recompiling it for 0.9.0
<novakane> ah yeah looks like it works for wlroots but not for wayland functions for me
<nullndvoid[m]> super annoying imo because I am very new and I have no clue what a function I wanna use is called and I have no clue what the parameters are, sorry though I'll stop whining now
<ifreund> nullndvoid[m]: you can look at the generated source in zig-cache/zig-wayland
<nullndvoid[m]> oh thanks, I was looking in the actual package code but I assume thats all generator code
snakedye has quit [Ping timeout: 276 seconds]
lxsameer has quit [Ping timeout: 246 seconds]
snakedye has joined #river
snakedye has quit [Read error: Connection reset by peer]
snakedye has joined #river
snakedye has quit [Ping timeout: 246 seconds]
snakedye has joined #river
snakedye has quit [Read error: Connection reset by peer]
<Shinyzenith[m]> > <@jacob:nullndvoid.xyz> I'm trying to write a simple wayland client application, I took a look at the hello wayland example but I have some questions from looking at example wayland client apps... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/cf7aeced97ca60dda21ac459471ed108089a1629)
<Shinyzenith[m]> Helps me to keep it organized
snakedye has joined #river
<Shinyzenith[m]> <nullndvoid[m]> "oh thanks, I was looking in..." <- Yep most of the work of zig wayland package goes into zig cache
<ifreund> could y'all matrix users please stick to the IRC feature set? Matrix only features are super noisy over the bridge and this is an IRC channel
<novakane> stop quoting messages would be a good start
lxsameer has joined #river
bw has joined #river
<bw> i think i might finally be ready to try river
<bw> however... `error: zig-wlroots requires wlroots version 0.15` am i using a too-new wlroots? i'm on nixos-unstable
<bw> yeah, looks like i've got 0.15.1, which i guess river's build doesn't like
gwizon has joined #river
gwizon has quit [Client Quit]
<novakane> bw wlroots 0.15.1 is fine
<bw> i had the nixpkgs-wayland overlay turned on, and that caused the issue. it seems to be fine after getting rid of that
snakedye has quit [Read error: Connection reset by peer]
snakedye has joined #river
lxsameer has quit [Ping timeout: 276 seconds]
lxsameer has joined #river
waleee has joined #river
elshize has quit [Ping timeout: 246 seconds]
elshize has joined #river
lbia has quit [Ping timeout: 246 seconds]
lbia has joined #river
talismanick has joined #river
ghostbusters2 is now known as ghostbuster
snakedye has quit [Ping timeout: 276 seconds]
snakedye has joined #river
pkap has quit [Quit: Client closed]
waleee has quit [Ping timeout: 260 seconds]
waleee has joined #river
waleee has quit [Client Quit]
waleee has joined #river
snakedye has quit [Ping timeout: 258 seconds]
snakedye has joined #river
lxsameer has quit [Ping timeout: 244 seconds]
lxsameer has joined #river
lxsameer has quit [Ping timeout: 276 seconds]
lxsameer has joined #river
draak has quit [Quit: WeeChat 3.5]
elshize has quit [Ping timeout: 255 seconds]
elshize has joined #river