Giter Site home page Giter Site logo

Comments (12)

Timidger avatar Timidger commented on May 26, 2024

Salutations.

Yes, I accidentally messed up the release build for the master branch :(. That's fixed now, and should be merged into master shortly.

Good on you for doing your research. I suggest some next steps in order for us to help you would be to give us the output from Way Cooler after you start it up and try to do things. Right now we don't log to a file by default, so you'll have to run it with something like way-cooler 2> dump.txt, and send us the ensuing file.

Also just to be sure, do you have dmenu and weston/weston-terminal installed on your machine? We use weston-terminal as the default terminal emulator in the config file, since it's one of the only wayland backed terminal emulators, and thus a good litmus test for basic functionality. Unfortunately, it's not included by default and it not appearing is a very soft warning in the log output only.

If you have both of those, something else must be afoot, and hopefully we can figure it out by pouring over your log files :).

from way-cooler.

AndreiUlmeyda avatar AndreiUlmeyda commented on May 26, 2024

Ólà,

thanks for the swift reply. Aur and cargo packages both compile.
The listed deps were installed at all times (weston + weston-terminal run and appear aok).

So I did the following:
I deleted the packages, reinstalled (aur) way-cooler-git as well as (cargo) way-cooler and bumped wlc back to 0.0.6 for the moment. The aur package now faults in a segly manner after briefly creating a window (there must be a segway-joke near, I can smell it) with a few wlc/layout tree related warnings and the final error msg

TRACE [layout::actions::layout] src/layout/actions/layout.rs:125 Layout was horizontal, laying out the sub-containers horizontally 
thread '<unnamed>' panicked at 'called "Result::unwrap()" on an "Err" value: Error { repr: Os { code: 32, message: "Broken pipe" } } INFO [way_cooler] src/main.rs:68 wlc: Parent exit (6242)

complete log: aur-xsession-wlc6.txt.

The cargo package failed visually similarly but the logs indicated that it choked on the config file like so

Looking at "/home/abetterusernamethanyours/.config/way-cooler/init.lua" 
 INFO [lua::init_path] .cargo/registry/src/github.com-1ecc6299db9ec823/way-cooler-0.3.2/src/lua/init_path.rs:56 Reading init file from fallback "/etc/way-cooler/init.lua" 
thread 'main' panicked at 'Unable to load config file: ExecutionError("\"Command toggle_float_active for keybinding Keypress(MOD_SHIFT | MOD_ALT, Some(\\\"space\\\")) not found\"")', src/libcore/result.rs:788

I, then, temporarily replaced (after doing so for ~/.config/way-cooler/init.lua failed) /etc/waycooler/init.lua with the one from the cargo source leading to it starting and ending up in a state equal in appearance to how it was described in my first comment. Log, this time run from tty: cargo-tty-wlc6-configFixed.txt

Logs do not appear to differ significantly when comparing way-cooler run from within x and from a separate tty or even between wlc versions, although I cannot guarantee I kept track of things at all times. Let me know if some combinations are more sensible than others and if I can just stick to one until further notice.

As an aside note: Mouse clicks on the background log
TRACE [layout] .cargo/registry/src/github.com-1ecc6299db9ec823/way-cooler-0.3.2/src/layout/mod.rs:78 Locking the tree!
to console and did so yesterday as well.

And another question: When started from within x way-cooler passes key events on after processing them, amirite? I suspect so since the exit hotkey works and mod+Enter is received by my window manager. Knowing for sure would let me test more confidently without switching ttys which, as you know, becomes a bit annoying the moment before doing it for the first time :].

Cheers

from way-cooler.

Timidger avatar Timidger commented on May 26, 2024

Hmm, that first log you posted is interesting because it looks like the background (for whatever reason) is being destroyed, and that might be the cause of the cause of the broken pipe (though honestly I don't know, that is a very strange error). If it persists, I suggest you try to disable the background (just comment out the background color option in the config file, it won't try to load it then).

As for your second one that seems much more normal, and is behaving as intended. However, according to the logs (second one) it looks like you just opened up Way Cooler and then immediately closed it, could you attempt to open some windows, e.g with Alt+Enter so we can be sure that the commands are being registered by Way Cooler? If you did try to issue commands, see the last 2 paragraphs of this comment for more details.

As an aside note: Mouse clicks on the background log...
Ah, yes that is some logging that has been culled in the latest master, just hasn't reached crates.io yet. We implement the background using a wayland surface, so it's treated just like any other window, which means the tree locks if you click on it.

If you run Way Cooler from within an X instance (e..g Awesome) then awesome generally pick up all the key events first and not past them on. This means if your terminal spawning is Alt+Enter as well, then Awesome will grab it, try (and potentially fail) to spawn a terminal (because when Way Cooler is running at the same time, that can sometimes happen, I think it has to do with how Wayland does things). The command never reaches Way Cooler at all.

In general, the best way to quickly try out Way Cooler is to run it embedded (e.g, don't switch to a TTY), so long as you set the commands to not conflict with your host wm's. There are still issues with dmenu (it for some reason decides to bind to the host wm instead of Way Cooler), but those aren't issues when running from the TTY and ultimately don't matter as much when simply testing it out.

from way-cooler.

AndreiUlmeyda avatar AndreiUlmeyda commented on May 26, 2024

I came here to quickly edit away my silly assumption that the window would get the event before the manager but it is too late now. Mom, I fucked it all up.

But seriously, glad we're homing in a bit. Will try what you are suggesting, though not right away.

I am pretty sure that I, during the events generating the second log, WAS hitting buttons. Hit mod+enter, mod+d and exhaustively roll my face over my keyboard is what I do these days and I did not stop while running way-cooler. And I noticed that there was complete log silence aside from the registered exit hotkey, as well. I will need to confirm this again, though, because if my memory serves me well it is unreliable. Since it was on tty there was definitely no awesomewm stealing shit (provided that I am not seriously misinformed about things).

Cyasoon

Edit:

I confirmed that no keyboard actions end up in the logs besides the exit command even without any x instances or window managers within 10m of my box.

Commenting out the background thingy leads to the background being black (as intended I presume) and the mouse cursor changing to a bigger one usually just showing for the first frame or so. Other than that behaviour, including logs, is unchanged.

It lead me to glance over the config file where it is mentioned that the exit hotkey is currently hardcoded and most likely not dependent on the config file being evaluated properly. Together with the diffuse config issue when running the cargo binary it may be useful to establish that this is not part of the problem. I should be running Lua 5.3.something as this is the latest version.

from way-cooler.

Timidger avatar Timidger commented on May 26, 2024

Yes, that's what the background looks like when we don't set it (absolutely hideous).

Hmmm, it does seem strange that nothing seems to be working, it could be a lua issue... in the gitter chat there has been discussion about a different issue with reading the configuration file, so there might be some issue with reading the configuration file with some versions of Lua...

@SnirkImmington, since both of issues reported were on Arch machines, have you tested Way Cooler with the latest Lua versions on your Arch box? It doesn't seem like Way Cooler is to blame (because this goes across versions), so it must be one of our dependencies. I can reproduce the segfault (because we are to blame on that, somehow), but I can't reproduce the commands not registering.

from way-cooler.

Timidger avatar Timidger commented on May 26, 2024

@AdrianSchurz

We have had a breakthrough in the other issue I mentioned that was in the gitter chat. Turns out we had some tiny itty bitty little undefined behavior in our wrapper library. That has been fixed on master. So if you recompile Way Cooler with the rust-wlc dependency set to git = "https://github.com/Immington-Industries/rust-wlc", this might fix the issue.

from way-cooler.

Timidger avatar Timidger commented on May 26, 2024

Background issue should be fixed as well, in the latest master. Thanks for bringing this to our attention

from way-cooler.

AndreiUlmeyda avatar AndreiUlmeyda commented on May 26, 2024

Aiiight, progress, weeeee.

Compiled as advised it runs and registers buttons. Along the way I finally woke up to the fact that "Alt" is the default mod key, not my mod key.

D'oh

At least I instinctively hit many buttons of the Ctrl Alt Shitfty variety as mod buttons a good portion of the times during past adventures, but likely not always. I blame the economy.
Current state of affairs:
background reenabled, draws in all its purply glory, no apparent issues
Alt+d opens the thing it is supposed to open
Alt+d; whatever input to the menu without hitting Enter; Alt+d again; Esc Closes the menu but immediately opens a new one (can't think of a use case for that)
Alt(+Shift)+l opens the corresponding menu. The non-shift version to evaluate lua code lets the whole thing freeze when I input the bracket [ (Alt Gr+8 on my german keyboard OHMIGAWD they know I am german now. must. eat. sauerkraut. to. ease. anxiety). Not sure what this amounts to on us keyboard layouts, though. Freeze meaning that the text cursors is not moving anymore and the menu cannot be closed anymore, only the trusted ol' exit hotkey still working like a charm. Someone give the thing a medal. (UPDATE, it does close if I configure urxvt then, while the menu hangs I open a terminal and close it again, the former frozen menu is then closed)
Alt+Enter is a bit on the stubborn side, still, as no terminal starts. UNLESS I change the terminal to my close friend urxvt, then it opens (probably not without some xwayland magic, I guess).
With a terminal open I could then confirm that workspace switching and sending windows to different workspaces appears to work.

No other menus or bars show, so no workspace indicators/clocks/etc, bummer.

So here is a log
custom-rust-wlc.txt
where I tried to capture some of these things by doing

  1. click three times, because I like to see where I started testing, maybe irrelevant to you :)
  2. Alt+Enter (config unchanged, tries to open weston-terminal)
  3. Alt+d, hit a few buttons, replicate the menu closing and reopening as described above
  4. Alt+l, type a bit then crash with [ as described above
  5. Alt+Shift+Esc

And a few questions to round things out:
Keyboard layouts are configured through wayland, aren't they?
Is dmenu's funcionality separated into different packages and I happen to have the lua code bar stuff but not the main bar? I am flailing a bit with this one, I admit.
How is this such a beauty of a comment?

Cheers

from way-cooler.

SnirkImmington avatar SnirkImmington commented on May 26, 2024

Compiled as advised it runs and registers buttons. Along the way I finally woke up to the fact that "Alt" is the default mod key, not my mod key.

This was mostly so when we ran tests embedded in X it didn't conflict with ours, will probably go back to the ever superior Mod4 in a future release.

The non-shift version to evaluate lua code lets the whole thing freeze when I input the bracket

It looks like this is just dmenu being confused. It probably can't handle all the Deutsch. Shouldn't be a way-cooler problem but we'll make sure (looks like something's being weird though).

must. eat. sauerkraut. to. ease. anxiety

nomnomnomnomnomnomnomnomnom

No other menus or bars show, so no workspace indicators/clocks/etc, bummer.

Shhhh we don't have those yet it's a secret

Alt+Enter is a bit on the stubborn side, still, as no terminal starts. UNLESS I change the terminal to my close friend urxvt, then it opens (probably not without some xwayland magic, I guess).

Yeah the whole point of Alt+Enter is it opens the terminal set in the init file (way_cooler.terminal = "weston-terminal"), it's very basic stuff.

Keyboard layouts are configured through wayland, aren't they?

I think there's somewhere we can handle it, @Timidger says xkb. I'll look into it when we switch to the Rust bindings for xkbcommon.

Is dmenu's functionality separated into different packages and I happen to have the lua code bar stuff but not the main bar? I am flailing a bit with this one, I admit.

dmenu is a simple popup menu that's usually run to provide a launcher. It's not wm-specific and it's not even designed for Wayland (but last we checked the Wayland clone didn't work).

In my searches deep in the filepaths of whereis dmenu I found a secret - dmenu is designed to allow customizing it the way we did in the Lua prompts (similar to the zenity program for making popup windows, check that out).
We only use it 'cause it's a pain to launch all your GUI programs from the terminal, we'll probably write a launcher after the bar and remove the hard dependency.

We don't have a bar, we just use this feature of dmenu to read the text from dmenu and pipe it into our Lua interpreter.

How is this such a beauty of a comment?

10/10 such beauty

from way-cooler.

Timidger avatar Timidger commented on May 26, 2024

Alt+Enter is a bit on the stubborn side, still, as no terminal starts. UNLESS I change the terminal to my close friend urxvt, then it opens (probably not without some xwayland magic, I guess).

Yeah the whole point of Alt+Enter is it opens the terminal set in the init file (way_cooler.terminal = "weston-terminal"), it's very basic stuff.

He said he has weston-terminal installed, but it's not working. I believe I have ran into the same issue, and it's because weston-terminal has updated to a new version of xdg-shell, see here.

Alt+d; whatever input to the menu without hitting Enter; Alt+d again; Esc Closes the menu but immediately opens a new one (can't think of a use case for that)

Hm I'm not sure why it's doing that, so you open dmenu, put some stuff in, press alt+d again, close the menu, and another one opens up? That might be caused by a number of things. If running embedded, perhaps a delay in the key press reaching Way Cooler?

For the freeze in regard to the lua pop-up, that might be due to an issue with not closing the window properly when we should.

If you can make steps to reproduce these other issues and open separate issues for them I'll be able to fix them before the next release.

Keyboard layouts are configured through wayland, aren't they?

No, it's configured via xkb, to change the keyboard change XKB_DEFAULT_LAYOUT

from way-cooler.

SnirkImmington avatar SnirkImmington commented on May 26, 2024

He said he has weston-terminal installed, but it's not working

Oops, my apologies. I submitted #122 anyway. It's definitely xdg-shell woes.

from way-cooler.

AndreiUlmeyda avatar AndreiUlmeyda commented on May 26, 2024

Ah yes, excellent.
I have nothing to add. Other than a little joke, since there must have passed several minutes already since the last one: A Rabbi, Kurt Gödel and Donald Trumps evil twin walk into that bar that shows at the top of the youtube video thumbnail on this projects front page and that shaped my expectations a bit leading me to, previously, not make it explicit I was looking for one. And Donald Trumps evil twin says: "We should abandon that joke right about now, it might even be perceived as rude meaning we will have miscommunicated." To which the Rabbi replies: "Okily Dokily". All the while Kurt just stands there seemingly not able to decide either way.

I will try my best to reproduce and make neat little issues (probably over the next two days).
Apologies for sometimes producing more text than necessary.

Until then, stay fresh

from way-cooler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.