GithubHelp home page GithubHelp logo

Comments (18)

 avatar commented on June 21, 2024 1

Yes, you're absolutely correct :-). And my vision is that the 'drop in' can happen at run-time when starting hlwm :-)

Would you want it to be compile time switchable too?

from herbstluftwm.

 avatar commented on June 21, 2024 1

I am going to work on reading your source code to begin doing this, keep a lookout for new PRs. I have absolutely zero understanding though of the wm. Let me know if you have any tips for understanding it better.

from herbstluftwm.

t-wissmann avatar t-wissmann commented on June 21, 2024

Hi, my vision is to have a single code-base that works for both xlib and wlroots, and I'm happy about help! I'm reluctant to fork the project because I fear that we can never merge the two again. This would imply that I have either double the maintainance work or one of the branches will die.

In the past, I tried to separate general hlwm concepts from xlib-specific code parts, but there is also still much work to be done. I accomplish the separation using signals: instead of the hlwm algorithm calling xlib-functions, the xlib-specific parts listen for signals from a self-contained hlwm that indicate some change.
For example:

  • 'the keybindings have changed' (see e.g. the KeyManager class).
  • there's a (simplified) css engine that defines visuals and so the actual x11 rendering is only 250 LOC (x11-widgetrender.cpp)

from herbstluftwm.

 avatar commented on June 21, 2024

To make sure I understand you correctly. Do you mean the code has been modularized where specific pieces could be rewritten to be drop in? i.e the keymanager class? If so first thing to do would be to modularize the codebase further? Otherwise begin doing that? Make it independent on X, then implement separate classes for wlroots?

from herbstluftwm.

t-wissmann avatar t-wissmann commented on June 21, 2024

Yes, you're absolutely correct :-). And my vision is that the 'drop in' can happen at run-time when starting hlwm :-)

from herbstluftwm.

 avatar commented on June 21, 2024

I'd be more than willing to help out with decoupling the wm from xlib. I could start a branch today and begin doing that. I'm unfamiliar with your codebase so it'd take a bit of time.

from herbstluftwm.

t-wissmann avatar t-wissmann commented on June 21, 2024

In order to keep things mergable, I highly recommend to start with only small changes. E.g. what I wanted to do soon is to create subdirectories (hlwm/, hlx/ and then hlway/) in order to divide the source files into the parts that are generally hlwm and the parts that are specific to X.

from herbstluftwm.

 avatar commented on June 21, 2024

For the first change, would creating hlwm. hlx and organizing everything be a good start? Then make a bunch of small changes over time? Or start with small changes and organize later?

from herbstluftwm.

t-wissmann avatar t-wissmann commented on June 21, 2024

For the first change, would creating hlwm. hlx and organizing everything be a good start? Then make a bunch of small changes over time? Or start with small changes and organize later?

yes, the smaller the PRs the better. E.g. just moving a couple files and adjusting the #include-directives is a good start

Yes, you're absolutely correct :-). And my vision is that the 'drop in' can happen at run-time when starting hlwm :-)

Would you want it to be compile time switchable too?

instead of a compile time switch, two executables are probably easier to use (with two main() functions).

from herbstluftwm.

 avatar commented on June 21, 2024

@t-wissmann Apologies for the delay. After looking over the project briefly I've determined that we will need to at some point overhaul the IPC since it's dependent on X11. I'd be willing to do the work, but what would you want to replace it with? I think supporting multiple IPC solutions would be unnecessary.

from herbstluftwm.

t-wissmann avatar t-wissmann commented on June 21, 2024

It's better to start with small changes. Even though the IPC isn't a very big change, one needs to be very careful when designing it, because one needs to be aware of the concurrency and avoid blocking (e.g. hlwm must not freeze even if 'hc' sends an incomplete request). I'm not familiar with wayland, but maybe they support some way of message interchange.

from herbstluftwm.

 avatar commented on June 21, 2024

Of course could start sorting the sources out to hlwm and xorg first. Wlroots implements an IPC solution we could use that or use something like dbus to avoid maintaining two implementations of the IPC.

from herbstluftwm.

ypnos avatar ypnos commented on June 21, 2024

Compositor Modules should be considered as a backend for porting HLWM to Wayland instead of Wlroots.

Advantages:

  1. Works both with X11 and Wayland, can port the whole codebase of HLWM once instead of introducing a new divergency in the code
  2. Provides high-level abstraction which should significantly reduce amount of new code to be written and might even reduce HLWM codebase by a bit
  3. Is a C++ library

Drawbacks:

  1. Although the code base is old and battle tested (KWin), the library by itself is very young
  2. It is a one-man project so far (a similar thing might be said about wlroots, but Como depends on wlroots, so it only adds an uncertainty)

from herbstluftwm.

gyreas avatar gyreas commented on June 21, 2024

What's the current state of this effort? (That person's account is deleted.)

from herbstluftwm.

t-wissmann avatar t-wissmann commented on June 21, 2024

Beside the messages in this thread, I have never received any kinds of contributions from this person. (I already found it quite suspicious that the person's github profile was almost empty...)

The current state of the effort is unfortunately rather unchanged, because I have essentially no time for hlwm at the moment because of family and my job.

from herbstluftwm.

gyreas avatar gyreas commented on June 21, 2024

I'd like to contribute to this effort esp their suggestion about incremental separation of concerns; however, I can't promise anything tho mostly because I'm not familiar with C++ (but C) and the codebase.
I'm going work on those and submit a draft PR when I get a basic understanding of both.

How does that sound?

PS: Was there a time when hlwm considered itself the wm for hackers by specifying so on the homepage? Do you have idea which wm did at some point? I kinda vaguely remember some wm did but don't which

from herbstluftwm.

ypnos avatar ypnos commented on June 21, 2024

from herbstluftwm.

gyreas avatar gyreas commented on June 21, 2024

@ypnos

while I'm not too sure about that, I think it's fitting for dwm.

from herbstluftwm.

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.