[2022-02-21T00:28:55Z] @illiliti: http://ix.io/3QeO [2022-02-21T00:28:56Z]  womp [2022-02-21T00:29:07Z] cloning kiss-libdemi and building libinput [2022-02-21T01:29:45Z] dilyn: clang i suppose? [2022-02-21T01:29:50Z] yessir [2022-02-21T01:33:38Z] fixed [2022-02-21T01:34:40Z] <3 [2022-02-21T01:40:54Z] noocsharp: this is bad [2022-02-21T01:41:01Z] at least there's immediate dereference which will crash the program [2022-02-21T01:41:21Z] still bad though [2022-02-21T01:49:30Z] i've been working on removing all the unnecessary allocations, but there's a lot of them [2022-02-21T01:50:28Z] and a bunch of other weird stuff [2022-02-21T01:50:48Z] it's weird that wl-clipboard is as widely used as it is given the code quality [2022-02-21T01:51:29Z] because it's the only implementation of a clipboard for wayland basically :v [2022-02-21T01:52:16Z] code quality is super bad [2022-02-21T01:52:16Z] https://github.com/bugaevc/wl-clipboard/blob/master/src/util/files.c#L221-L222 [2022-02-21T01:52:19Z] look at this [2022-02-21T01:52:42Z] fixed: https://github.com/noocsharp/wl-clipboard [2022-02-21T01:53:29Z] https://github.com/bugaevc/wl-clipboard/blob/master/src/util/files.c#L206 [2022-02-21T01:53:33Z] hardcoded /tmp [2022-02-21T01:53:46Z] use TMPDIR first [2022-02-21T01:54:10Z] i haven't fixed that yet, but i'll put it on the list [2022-02-21T01:56:37Z] maybe it would be better to just write a better one from scratch [2022-02-21T01:57:26Z] indeed [2022-02-21T01:57:38Z] the code is too bad [2022-02-21T01:58:22Z] https://github.com/bugaevc/wl-clipboard/blob/master/src/util/files.c#L169-L171 [2022-02-21T01:58:25Z] gosh [2022-02-21T01:58:36Z] and the maintainer is gone to help r invade u probably [2022-02-21T01:59:07Z] let distro maintainer decide which path should be used, stop doing this nonsense [2022-02-21T02:01:04Z] https://github.com/bugaevc/wl-clipboard/blob/master/src/wl-paste.c#L103-L129 [2022-02-21T02:01:14Z] lol [2022-02-21T02:01:33Z] I should learn go faster to write a better version :V :V :V [2022-02-21T02:01:44Z] it has to be in c or nobody will use it [2022-02-21T02:02:00Z] :| [2022-02-21T02:02:01Z] ^ [2022-02-21T02:02:41Z] but golang so kewl [2022-02-21T02:03:04Z] it has to be in c or illiliti won't use it [2022-02-21T02:03:36Z] weeeeeellllll [2022-02-21T02:04:09Z] illiliti is your wlroots fork based on -.15x or 0.14? [2022-02-21T02:04:22Z] latest master [2022-02-21T02:04:31Z] hng [2022-02-21T02:05:59Z] soliwilos said they was able to apply my patch to 0.15.0 [2022-02-21T02:06:30Z] my problem is that wayfire still uses 0.14.1 [2022-02-21T02:06:41Z] ah [2022-02-21T02:12:51Z] noocsharp: https://github.com/noocsharp/wl-clipboard/blob/master/src/util/files.c#L150 [2022-02-21T02:12:54Z] ssize_t [2022-02-21T02:17:03Z] yeah, i saw that a few days ago [2022-02-21T02:17:31Z] forgot about it apparently [2022-02-21T02:18:04Z] it's inherited from master [2022-02-21T02:22:35Z] https://github.com/noocsharp/wl-clipboard/blob/master/src/util/files.c#L152 [2022-02-21T02:23:00Z] i would put assert here or smth to make sure it's newline [2022-02-21T02:24:49Z] tbh i'm probably gonna abandon this and just write a new one [2022-02-21T02:26:13Z] yeah [2022-02-21T02:27:14Z] i feel like it's much easier to get error checking right if you're diligent about it from the beginning than shoehorning it into a project that didn't pay attention to it [2022-02-21T02:29:29Z] my thoughts exactly [2022-02-21T02:33:04Z] no wonder why wl-clipboard is too buggy. i use fg/bg instead of tmux and sometimes if i copy something it can cause deadlock [2022-02-21T02:33:20Z] i have no choice but to kill -9 [2022-02-21T02:39:38Z] Hi [2022-02-21T02:42:53Z] \o/ [2022-02-21T02:43:24Z] "ssize_t" <- Bruh [2022-02-21T02:43:42Z] It's gonna explode if a signal is received [2022-02-21T02:51:10Z] typedef char * const *argv_t [2022-02-21T02:51:10Z] Cursed [2022-02-21T02:51:55Z] signals are bug by definition btw [2022-02-21T02:52:06Z] we need signal-free versions of functions [2022-02-21T02:52:16Z] see close() EINTR fallout [2022-02-21T02:53:18Z] I write a wrapper for them with a loop to check errno for eintr [2022-02-21T02:53:48Z] never [2022-02-21T02:54:01Z] for close!? [2022-02-21T02:55:56Z] never ever use close() in the loop [2022-02-21T02:56:10Z] No [2022-02-21T02:56:13Z] i meant write / read [2022-02-21T02:56:18Z] while (close() == -1); [2022-02-21T02:56:24Z] http://ix.io/3Qf8 womp womp [2022-02-21T02:56:24Z] the greatest shame is that hikari requires pango :v [2022-02-21T02:56:59Z] hi testuser:) [2022-02-21T02:57:36Z] Bruh illiliti something actually did that https://github.com/wahern/cqueues/issues/56 [2022-02-21T02:58:21Z] unix is really simple when you don't look too hard [2022-02-21T03:03:48Z] dilyn: what patch are you trying to port? [2022-02-21T03:04:18Z] https://github.com/illiliti/wlroots/commit/c118c6d562fabbc2a456f47d0c1f94747de23d48.patch [2022-02-21T03:04:26Z] latest on libdemi branch [2022-02-21T03:04:38Z] oh harumph... [2022-02-21T03:04:38Z] one sec [2022-02-21T03:05:02Z] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3451.patch [2022-02-21T03:05:34Z] i no longer update github branch [2022-02-21T03:06:52Z] aha i see i see [2022-02-21T03:07:06Z] we'll see :V [2022-02-21T03:30:27Z] noocsharp: if you're going to (re)write wl-clipboard, consider taking a library approach [2022-02-21T03:30:35Z] so people can use your API instead of shelling out to command [2022-02-21T03:30:52Z] https://github.com/YaLTeR/wl-clipboard-rs [2022-02-21T03:30:59Z] something like that, but in c [2022-02-21T03:32:09Z] yeah, let me get something working first and then i'll do that [2022-02-21T03:33:39Z] yeah, no rush [2022-02-21T03:34:32Z] Rich [2022-02-21T03:35:19Z] yeah yeah yeah yeah [2022-02-21T03:40:04Z] http://ix.io/3Qfi [2022-02-21T03:40:27Z] if you're going to rewrite wl-clipboard consider using a nonGPL license<3 [2022-02-21T03:41:15Z] i have never used gpl in my life [2022-02-21T03:41:27Z] my man 8) [2022-02-21T03:42:54Z] although every time i start working on something i spend a day debating whether to make it gpl [2022-02-21T03:43:18Z] include a Dilyn-exception [2022-02-21T03:43:53Z] dilyn: make sure #include "backend/session/session.h" is present [2022-02-21T03:44:07Z] in backend/session/session.c [2022-02-21T03:44:17Z] it is :V [2022-02-21T03:44:22Z] hence my confusion lmao [2022-02-21T03:44:36Z] I thought I had bungled an ifdef but that isn't the case either [2022-02-21T03:44:45Z] something just isn't being roped in somehow... [2022-02-21T03:44:50Z] U mostly don't need to worry about corpos stealing ur stuff unless it's webscale 🚀 related [2022-02-21T03:45:05Z] But i still use gpl [2022-02-21T03:45:09Z] grep session_open_if_kms include/backend/session/session.h [2022-02-21T03:46:07Z] ack [2022-02-21T03:46:08Z] ain't there [2022-02-21T03:46:11Z] only present in two files [2022-02-21T03:46:26Z] oh wait hold on [2022-02-21T03:47:39Z] it isn't present in that file; [2022-02-21T03:47:40Z] ./backend/session/udev.c: session_open_if_kms(session, udev_device_get_devnode(dev)); [2022-02-21T03:47:40Z] ./backend/session/demi.c.orig: struct wlr_device *wlr_dev = session_open_if_kms(ctx->session, devnode); [2022-02-21T03:47:41Z] ./backend/session/session.c: struct wlr_device *wlr_dev = session_open_if_kms(session, devnode); [2022-02-21T03:49:39Z] https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/6da814b2c26509799553c6005ac4b62877129f01/backend/session/session.c#L256 [2022-02-21T03:50:29Z] dilyn: also, i recommend using git merge to merge patches [2022-02-21T03:50:55Z] it's smarter than patch [2022-02-21T03:51:59Z] hm yes that is very true :thinking: why didn't I think of that [2022-02-21T03:52:42Z] re GPL, my rule: ISC for libs, 0BSD for algos/simple programs/build scripts, GPLv3 for everything else [2022-02-21T03:52:53Z] interestingly that line exists in wlroots 0.14.1 but the struct isn't defined in include/backend/session/session.h in 0.14.1... [2022-02-21T03:54:14Z] jk it exists as *open_if_kms* smh [2022-02-21T03:54:26Z] hmm [2022-02-21T03:55:33Z] i see [2022-02-21T03:55:45Z] rename it to session_open_if_kms [2022-02-21T03:58:24Z] a few more errors [2022-02-21T03:58:39Z] specifically "static dec of "session_open_if_kms" follows non-static dec" [2022-02-21T03:59:10Z] http://ix.io/3Qfk [2022-02-21T03:59:45Z] oh shit no lol that's a bad thing; my mistake [2022-02-21T04:00:16Z] fixed the patch; now it's the same error as before except open_if_kms is undef. so perhaps just rewrite open_if_kms as session_open_if_kms? [2022-02-21T04:02:44Z] indeed, there was one lingering open_if_kms. changed it, and it built. [2022-02-21T04:03:55Z] okay. if everything worked, i should be back in less than two minutes. If I'm not, it did *not* work :V [2022-02-21T04:10:09Z] lol [2022-02-21T04:13:07Z] rip [2022-02-21T04:18:29Z] https://termbin.com/nog8 cherry-picked [2022-02-21T04:18:32Z] not tested [2022-02-21T04:28:09Z] https://termbin.com/9poh [2022-02-21T04:28:20Z] should work now [2022-02-21T04:33:37Z] :v [2022-02-21T04:33:40Z] will test soonish [2022-02-21T04:53:24Z] it may theoretically be my problem [2022-02-21T04:59:19Z] wdym? [2022-02-21T05:02:31Z] can you post logs or something? [2022-02-21T05:02:50Z] backtrace if it's segfault [2022-02-21T05:11:21Z] no segfaults or anything; wayfire launches just fine [2022-02-21T05:11:30Z] just no input, not a permission problem afaik [2022-02-21T05:12:11Z] hmm [2022-02-21T05:12:14Z] I can try to nab some logs from wayfire later to see what's up [2022-02-21T05:12:21Z] but for now, pizza and reacher time :v [2022-02-21T05:12:59Z] most of this work will probably be rendered irrelevant once wayfire is updated to latest wlroots anyways; wayfire itself doesn't actually use any libudev stuff [2022-02-21T05:13:26Z] well that may or may not be true; I suppose I'd have to see how it's using wlroots [2022-02-21T05:14:03Z] git grep udev [2022-02-21T09:49:31Z] Why do you prefer ISC license for libs? [2022-02-21T10:17:37Z] permissive, allows static link unlike gpl [2022-02-21T15:28:58Z] noocsharp: https://emersion.fr/blog/2020/wayland-clipboard-drag-and-drop/ [2022-02-21T16:38:39Z] illiliti: `git grep udev` only reveals a single CI workflow :o hmhmhm [2022-02-21T16:41:32Z] good [2022-02-21T16:41:38Z] dilyn: does sway work with libdemi btw? [2022-02-21T16:41:48Z] no idea, never tried! [2022-02-21T16:41:59Z] I am not a super big fan of tiling wms nowadays :\ [2022-02-21T16:42:48Z] no input devices means there's a possible bug in my libinput patch or libdemi [2022-02-21T16:43:09Z] you can help me catch one [2022-02-21T16:43:11Z] i agree [2022-02-21T16:43:25Z] wayfire has several debugging options; I'll collect them independently and send 'em your way [2022-02-21T16:43:51Z] that would be awesome [2022-02-21T16:43:55Z] so I'll be back after a few reboots haha [2022-02-21T16:51:39Z] illiliti: thanks, that's much easier to read than the wayland headers [2022-02-21T16:57:20Z] seems like command line copy and paste isn't possible with the core wayland protocol, since only the window with keyboard focus can copy things [2022-02-21T16:57:24Z] so wlr-data-control it is [2022-02-21T17:06:03Z] broken input: http://ix.io/3QiT [2022-02-21T17:06:04Z] working input: http://ix.io/3QiU [2022-02-21T17:06:04Z] Biggest difference between first and second is device enumeration actually happens when it works; libinput is 'initialized' in the first, but no enumeration happens. I don't think there's a way to increase verbosity [2022-02-21T17:06:40Z] places of interest in wayfire code may be src/core/seat/seat.cpp [2022-02-21T17:11:04Z] it happends randomly, right? [2022-02-21T17:11:19Z] jk that code isn't actually that interesting [2022-02-21T17:11:23Z] what do you mean it happens randomly? [2022-02-21T17:11:32Z] it happens every time I start wayfire. no input, regardless of how long I wait [2022-02-21T17:11:56Z] how did you get working input then [2022-02-21T17:12:04Z] oh i rebuilt everything against libudev-zero lmao [2022-02-21T17:12:11Z] ah [2022-02-21T17:12:33Z] sounds like a bug tbh [2022-02-21T17:13:05Z] mhm [2022-02-21T17:14:31Z] post output of: ls -la /dev/input [2022-02-21T17:14:40Z] it's what you would expect [2022-02-21T17:14:43Z] root:input 660 [2022-02-21T17:14:55Z] all the devices i would expect to exist are there [2022-02-21T17:15:17Z] post anyway [2022-02-21T17:15:57Z] http://ix.io/3Qj0 [2022-02-21T17:19:43Z] revert this: https://github.com/illiliti/libinput/commit/75959303e3ee629fcdc1e4a4dff152942052bf45 [2022-02-21T17:26:34Z] dilyn: did you know that kiss caches git repos? [2022-02-21T17:26:41Z] that's might be a problem [2022-02-21T17:26:44Z] I did indeed, it's a new thing [2022-02-21T17:26:54Z] but I'm not using git+ i'm using archive/commitnum.tar.gz [2022-02-21T17:27:13Z] ah, that's ok then [2022-02-21T17:27:23Z] it's on my long pursuit to kiss r git :v [2022-02-21T17:27:58Z] kiss b got [2022-02-21T17:30:17Z] :O  don't do this to me illiliti [2022-02-21T17:36:41Z] pretty sure the bug somewhere in the 0.14.1 wlroots patch [2022-02-21T17:37:45Z] need confirmation that bug is present on latest sway/wlroots [2022-02-21T17:40:32Z] http://ix.io/3Qj8 [2022-02-21T17:40:32Z] I suppose I can test latest wlroots/sway for you [2022-02-21T17:40:49Z] anything to put off learning about io.Reader in golang I suppose [2022-02-21T17:44:17Z] io.Reader is easy if you know interfaces and type assertion [2022-02-21T17:44:26Z] exactly [2022-02-21T17:44:31Z] (: [2022-02-21T17:44:45Z] Soon [2022-02-21T17:49:23Z] dilyn: https://libera.irclog.whitequark.org/kisslinux/2022-02-11#31751015 << what do you think? [2022-02-21T17:50:25Z] do you still want to maintain it, just under the umbrella of the org? [2022-02-21T17:50:35Z] I think to transfer the repo you just need to be a member and that can be arranged [2022-02-21T17:56:32Z] i wrote a 100 line program that lets you paste a fixed string in wlroots [2022-02-21T17:56:47Z] how is wl-clipboard possibly 1800 lines [2022-02-21T17:57:08Z] Show [2022-02-21T17:57:16Z] under umbrella, indeed. i also want to revisit and modernize it a bit [2022-02-21T17:57:28Z] for sure. I'll send the invite now, feel free to transfer it! [2022-02-21T17:58:42Z] built latest libdemi/libinput/wlroots/sway from kiss-libdemi; will reboot and see. Though I've rarely had luck running sway with input being detected at all, so I might not be the best tester lmao [2022-02-21T18:01:32Z] https://github.com/noocsharp/wayclip [2022-02-21T18:02:26Z] nice! [2022-02-21T18:05:07Z] dilyn: thanks. will do something today and probably tomorrow [2022-02-21T18:05:17Z] s/and/or/ [2022-02-21T18:15:11Z] can't even get sway to connect to my outputs :V :V :V [2022-02-21T18:15:11Z] http://ix.io/3Qjg [2022-02-21T18:15:12Z] But it seems that libinput also fails to enumerate devices, can try with reverting that commit if you'd like [2022-02-21T18:18:54Z] WLR_DRM_NO_MODIFIERS=1 [2022-02-21T18:24:24Z] you're making me try too hard lmao [2022-02-21T18:25:08Z] xd [2022-02-21T18:32:25Z] off we go again :X [2022-02-21T18:54:21Z] illiliti: no changes [2022-02-21T19:04:33Z] ok. we can debug this if you want to continue [2022-02-21T19:04:43Z] https://termbin.com/3y33 [2022-02-21T19:13:59Z] do you want me to stick with sway or go back to wayfire? [2022-02-21T19:14:11Z] because i'll have to first get sway working lmfao [2022-02-21T19:16:05Z] doesn't matter [2022-02-21T19:16:55Z] perfecto. more than happy to help! [2022-02-21T19:17:15Z] thanks! [2022-02-21T20:32:13Z] someone here using kde in kiss? [2022-02-21T20:37:18Z] dilyn: kiss KDE is working great? [2022-02-21T20:39:51Z] last I checked, not so much :\ [2022-02-21T20:40:06Z] issue with plasmashell crashing or simply not doing what it should when using kwin [2022-02-21T20:40:28Z] but if you set KDE_WM=sowm or some other wm it works quite well, you just won't have the traditional plasma desktop [2022-02-21T22:44:34Z] sad kde will not work [2022-02-21T22:44:47Z] then i will give up my project [2022-02-21T22:58:48Z] @illiliti: this is interesting; http://ix.io/3QkK [2022-02-21T22:59:13Z] we can also move this to github if you'd rather track the issue there