<leon-p>
those weird github scraper websites are always a source of fun. Apparently river is "mostly written in C" and "has a large development team".
<leon-p>
and they have me as an "xlib expert", lol
leon-p has quit [Quit: leaving]
Guest90 has joined #river
Guest90 has quit [Quit: Ping timeout (120 seconds)]
leon-p has joined #river
snakedye has quit [Ping timeout: 258 seconds]
leon-p has quit [Quit: leaving]
novakane has joined #river
snakedye has joined #river
dbuckley has quit [Ping timeout: 240 seconds]
dbuckley has joined #river
Guest48 has joined #river
leon-p has joined #river
<Guest48>
hello!
<Guest48>
I am having much problems starting river.
<ifreund>
what error do you get?
<Guest48>
when i execute the `river` command it gives me error messages [libseat] [...../logind.c] permission denied
<Guest48>
thank you ifreund!!!
<Guest48>
many many thanks for such an wonderful effort.
<Guest48>
i am very eager to get my hands on your compositor for wayland.
<ifreund>
Guest48: what distro are you on? are you using logind? elogind? seatd?
<Guest48>
I am using a fresh arch install! i tried to look for the error messages on the internet, following a suggestion i removed `libseat` and installed `seatd`. i also installed `elogind` and `dbus-elogind` as per suggestion but none of them helped.
<Guest48>
i also tried to execute `river` as root, but it gave me a blank screen and none of the key bindings worked.
<ifreund>
Guest48: if you're on arch you don't need seatd or elogind
<ifreund>
arch is systemd based so you'll have logind already running by default
<ifreund>
could you paste the full error message in a pastebin somewhere?
<ifreund>
running river as root is not supported and certainly not recommended
<Guest48>
ohh! I have really messed up then. i have installed some packages from AUR that removed some of my systemd services and replaced them with theirs.
<Guest48>
should i reinstall arch and comeback?
<Guest48>
and try to see what error messages i get because i forgot to save them somewhere.
<ifreund>
if reinstalling arch is the easiest way to reverse those changes for you, sure that's a path you could take
<leon-p>
Guest48: first try uninstalling the AUR packages. With a bit of luck, your systemd services where only masked, not disabled
<Guest48>
Thanks for your time ifreund! much appreciated. I saw your introductory video on youtube on writing a compositor with zig and determined to try it out. i will certainly comeback after.
<Guest48>
oh sure leon-p! i will try that first.
<leon-p>
unfortunately, arch by default ships quite a mess of services and if something messed any of that up, you have a problem
<Guest48>
:')
<Guest48>
wrong emoji
<Guest48>
ahh.
<Guest48>
: ')
<yyp>
I think it would be nice to have an override for pkg-config file version with an environment variable, like `VERSION="0.1.0_git" zig build` in a package
<yyp>
At least while the first release is not out
<ifreund>
yyp: are you talking abou the river-protocols pkg-config?
<yyp>
Yes
<ifreund>
what's the use-case?
<yyp>
Some build systems (namely abuild) error out when versions of pkg-config files and packages that own them don't match. Would be nice to allow overriding that
<ifreund>
yyp: I think you should stick a sed command in the abuild
<ifreund>
I don't think solving this upstream makes sense tbh
<ifreund>
this is an abuild specific issue as it uses a different version string convention than river does
<ifreund>
and a single sed command doesn't seem like a big deal to me
<yyp>
I think that allowing downstream to easily update versions is a generally good thing. Not all downstreams have the same versioning conventions. And patching the source like this should be a last resort
Guest48 has quit [Quit: Client closed]
Guest48 has joined #river
<Guest48>
I have rebooted into new fresh arch install! now i am going to AUR and install `river-git` and see what happens.
<novakane>
leon-p: I was reading your updated article on layout and you say a layout demand may time out, what's the time frame? Out of curiosity
<leon-p>
novakane: 1s
<leon-p>
IIR
<leon-p>
C
<leon-p>
It's just an arbitrary value though
<ifreund>
1s is super high
<ifreund>
anything over ~100ms is going to be a crappy user experience
<ifreund>
we should probably change it to 200ms or something
<leon-p>
give me a second and I'll submit a PR
<novakane>
yeah I guessed it would be really bad to hit it, I didn't thought about it before reading this, it makes me curious
<leon-p>
huh, is the article up already? It's still a draft. Must have pushed it by accident
<novakane>
yeah I have it in the rss feed
<novakane>
I will have read all versions of this article I guess :P
<leon-p>
oops, I messed up the PR
<leon-p>
somehow a different branch snuck in there
<ifreund>
leon-p: I think 200 is still too high tbh, how long does the slowest layout generator we have take? I can't imagine it's more than 50ms
<ifreund>
someone should write one in python and see how slow it is :P
<novakane>
lmao
<leon-p>
is python wayland aware?
<leon-p>
has someone created a wayland lib?
<leon-p>
ifreund: you could also just hyperfine the old contrib python layout with a large amount of views and add in a few ten ms to account for Wayland time
<ifreund>
leon-p: that wouldn't be accurate as that would probably be dominated by cpython startup time
<ifreund>
qtile also has wayland support now apparently
<ifreund>
anyhow, the proper way to measure this would be to run the layout generator with WAYLAND_DEBUG=1 and compare the timestamps between the layout_demand and the commit
<ifreund>
I really need to get back to studying though o7
<leon-p>
o7
<novakane>
0.26 for rivercarro
<Guest48>
hi! this is my error message. this is handwritten, because i didnt know how to copy from screen.
<novakane>
2366488.731 layout_demand and 2366488.991 commit
<leon-p>
.318 for stacktile with five views
<leon-p>
Guest48: I am guessing here, but it seams your river tries to use seatd despite logind running.
<Guest48>
oh! how can i fix this behavior?
<leon-p>
I recommend you try building river from source manually, it's not hard
<Guest48>
oh ok then i am removing the aur package and installing manually again.
<ifreund>
leon-p: libseat tries logind as well, but it fails for whatever reason
<ifreund>
looks like sd_bus_call_method() is returning EPERM
<leon-p>
huh
<leon-p>
Guest48: what are your user groups?
<Guest48>
one solution i found on internet was to modify `/etc/environment` to force use `logind`. should i try that as well?
<Guest48>
oh! i am in wheel group.
<leon-p>
any other groups?
<Guest48>
no! i am sorry i aonly added my user to wheel if i made mistake there.
<leon-p>
try adding your user to the video group and try launching river again
<leon-p>
I remember that being necessary
<Guest48>
sure! i am doing it and reporting back what happens.
<Guest48>
and coming back compiling river it may take a bit time.
<Guest48>
hi! i added my user to video group, rebooted and launched `river`, but error messages were same. then i modified my `etc/environment` as follows:
<Guest48>
LIBSEAT_BACKEND=logind
<Guest48>
then first two lines of the error messages were gone.
<Guest48>
but it is still showing errors. for now, it seems like `Could not connect to socket run/seatd.sock: No such file or directory` is not showing any more.
<novakane>
the first two lines of the error are not important for you, libseat try to connect to seatd and if you don't have it it try logind, so you're problem is not that it dosn't use logind but that logind doesn't works because of permission problems
<novakane>
Guest48: are you using nvidia by the way?
<Guest48>
ohh. how do i give logind proper permission? and i am using intel 620 graphics card. :)
<leon-p>
Guest48: do you have XDG_SESSION_ID and XDG_SESSION_TYPE in your environment?
<novakane>
systemd handle XDG_RUNTIME_DIR right?
<ifreund>
novakane: logind does yes
<ifreund>
(and the error for that would be different)
<novakane>
ok thanks
<Guest48>
hi! it was not set in my environment. when i tried to do `echo $XDG_SESSION_TYPE` it showed `tty`.
<Guest48>
sure thing! i do it in the `etc/environment` right? just to be sure again. and do i also need to set `XDG_SESSION_ID` ?
<novakane>
Guest48: no just launch river in the tty with this command
<leon-p>
Guest48: you can set it temporarily for just one command by putting it in front of it
<Guest48>
I executed the command and it is showing me identical errors. : /
<Guest48>
i have messed up something deeply somewhere.
<leon-p>
Guest48: are you new to arch? maybe you missed a step during installation
<leon-p>
it really shout just work ootb
<Guest48>
yes i am very new! it has been two weeks. :) maybe i am doing something wrong repeatedly during each installation. sorry for hampering your time leon-p and ifreund! i will look into my installation process carefully from now on. once again thanks for your time and help both of you :)
<Guest48>
also novakane thanks for your help!
<novakane>
could be a polkit problem maybe? I don't remember how it was installed on arch
snakedye has quit [Ping timeout: 240 seconds]
<Guest48>
Hi! river launched somehow. i tried everything on internet, nothing worked. then being depressed i installed `weston` and called it a day for my wayland journey. after quitting weston i launched river again out of curiosity, and it launched normally. maybe weston did some magic in the background.
<Guest48>
everything is magical on linux.
<Guest48>
no one knows what is going to happen very next moment.
<novakane>
I don't think it's magic but good for you :P
<elshize>
I'd say it's magical :D
<elshize>
as in extraordinary
<leon-p>
Any sufficiently messed-up technology is indistinguishable from magic
<Guest48>
hahaha, thank you novakane and elshize! now i will try to modify the init file to launch my rusty `alacritty` terminal on river.
<Guest48>
leon-p you are right on the point. you made me laugh hard.
<ifreund>
logind is certianly sufficently messed-up :P
snakedye has joined #river
<Guest48>
i wanted to share a picture. it is from my current arch setup that i had with xmonad window manager. i designed the xmobar with some glyphs (on the top). you can check it out and rate the design :)
<leon-p>
is anyone using a different language for their init? I was thinking of adding a few features to my config that are uncomfortable to do in shell.
<novakane>
leon-p: what's features you want to add? I don't any use case for an other language yet, just bash to have array
<leon-p>
novakane: I want to add a theme randomizer
<leon-p>
I could of course put something together in C or zig, but I think that would be absolute overkill and not very flexible
<novakane>
right there is better choices for scripting
<novakane>
did you try with bash though?
<leon-p>
novakane: Not yet. It's of course possible, but it would not be pretty
<novakane>
yeah if it's too complex bash is ugly, I guess python or lua then maybe?
<leon-p>
I think I'll try GNU/Guile first.
<novakane>
oh yeah it could be good, never used it
<novakane>
do you have experience with it?
<leon-p>
a little. I used to do some math stuff in scheme a few years back
<novakane>
okay, I mainly have experience with fennel for lisp languages, always wanted to learn more but I didn't take the time yet
<novakane>
I use a bit of a lot of them but never really stick with one enough to be good
<ifreund>
leon-p: why not do just the theme randomization part in zig/C?
<leon-p>
ifreund: guess what I am writing right now :P
<ifreund>
if you want a nice lisp with good C interop, janet is cool
<ifreund>
:D
<leon-p>
My plan is to have a simple program that reads themes from a directory of config files and sets arbitrary env vars. I'll just put it before my init
leon-p has quit [Quit: leaving]
<edrex[m]>
<leon-p> "is anyone using a different..." <- i usually fall back to python when i get annoyed with bash. but that's just because it was my first interpreted language i think. sometimes ruby too. sometimes go (*ducks*)
<edrex[m]>
did i read somewhere that Guix's init is written in Guile?
<edrex[m]>
i am curious about river's design ethos. Specifically, I see it largely avoiding i3's approach of treating scripts as a seperate user segment than interactive users (for example, no ability to target windows by handle with commands, no equivalent of get_tree).
<edrex[m]>
Maybe this is partly just motivated by desire to use wayland protocol extensions more
<edrex[m]>
but i like how short the list of riverctl commands is.
<edrex[m]>
i guess the downside is that it is necessary for many features to implement them internally rather than as scripts. For example, IDT "go to next/prev non-empty tag" is possible as a script. Or "send all views in current tagset to next output" (context: https://github.com/ifreund/river/issues/357#issuecomment-894475682)
<edrex[m]>
but IDK if that's necessarily a bad thing. my experience with scripting i3/sway is there are a lot of gotchas/dead ends
<ifreund>
edrex[m]: while river's core functionality is getting pretty stable, the configurability/scriptability/introspectability is nowhere close to what I want yet
<ifreund>
I imagine in another year the best way to program custom functionality into river will be with a wayland client written in a scripting language like python using new river-control and river-toplevel protocols
<ifreund>
which will be far more powerful than the current riverctl CLI
<ifreund>
there are still a ton of details to work out on the way there though
<ifreund>
the challenge will be figuring out how to do all that cool stuff while maintaining frame perfection
dbuckley has quit [Ping timeout: 258 seconds]
dbuckley has joined #river
novakane has quit [Quit: WeeChat 3.2]
dbuckley has quit [Ping timeout: 258 seconds]
dbuckley has joined #river
dbuckley has quit [Ping timeout: 258 seconds]
dbuckley has joined #river
dbuckley has quit [Ping timeout: 250 seconds]
<edrex[m]>
<ifreund> "I imagine in another year the..." <- river-toplevel could be a place to expose PID+view handle?
<edrex[m]>
namespaces making pids non-unique is annoying. maybe namespace ID + PID is the new PID?
snakedye has quit [Ping timeout: 272 seconds]
dbuckley has joined #river
leon-p has joined #river
snakedye has joined #river
dbuckley has quit [Ping timeout: 256 seconds]
dbuckley has joined #river
<leon-p>
edrex[m]: I think what you perceive as rivers design ethos in this context is just me being pretty vocal against scripts :D
<leon-p>
or better said, the kinds of scripts you'd see on X, which don't respect frame perfection at all
* leon-p
shudders
<edrex[m]>
what sort of scriptability would affect frame perfection?
<leon-p>
As an example some people use scripts to handle which windows go on which workspace. When a window is mapped, it will appear for a split-second and will be handled by the window-manager before some hook calls some script which calls some Xlib client to put it on another workspace.
<edrex[m]>
idt y'all are talking about general race conditions between msg receive and send in async APIs
<ifreund>
yeah, and we want to not have them
<ifreund>
because there is a better way to do things
<edrex[m]>
i guess you can support registering state machines or some such
<leon-p>
basically what I don't want to see is this visibly, noticeable delay between things happening and scripts reacting to it
<edrex[m]>
or just have persistently-connected responsive clients
<edrex[m]>
yeah, agreed
<edrex[m]>
that is a good goal
<leon-p>
and since TIL that there are pythong wayland libs, scripting can still be supported, just in a more involved but also omre powerful way
<leon-p>
*python
<edrex[m]>
there's no provision for syncronizing different protocol message streams right? so you don't know if your received messages are still up-to-date, or if you're reading from two different protocol streams they might arrive out-of-order
<ifreund>
I don't follow, are you talking about 2 separate wayland connections in one program?
<edrex[m]>
yes, the protocol-client approach to customizing behavior seems like a good fit for wayland (except for concerns about race conditions, but i think any protocols allowing client control just need to be smartly designed
<edrex[m]>
yes
<ifreund>
yeah, it all comes down to good protocol design in the end
<edrex[m]>
do clients open just one connection for all extensions, with message-order guarantees?
<leon-p>
edrex[m]: I am not aware of any commonly used client that uses multiple message queues
<ifreund>
there's only one wayland connection per client as far as river is concerned
<ifreund>
if some ugly program decided to open two separate wayland connections it'd be seen by river as 2 clients
<ifreund>
there should never be any need for that though afaik
<edrex[m]>
oh ok, that's good. and the client just advertises which protocol extensions it's interested in receiving messages for somehow? or is receiving messages from the server always the result of an explicit message from the client "hey send me messages of this type"? I should just look through the docs some more.
<leon-p>
There can still be issues wrt message order because for globals the order the server sends events isn't (always) guaranteed, but for most cases you will never hit those cases
<leon-p>
edrex[m]: it's the other way around: The server dumps onto the client everything it supports and the client can then just bind the object it cares about
<ifreund>
if you want to get a feel for how the protocol is used in practice, reading WAYLAND_DEBUG=1 logs of e.g. foot can be interesting