Comments (6)
Tiled layouts are configured per tag, so I think I need to do basic tags first.
from way-cooler.
So previous versions of Way Cooler had i3 like tiling. However, for Awesome tiling the tiling is done "entirely" through Lua.
I say "entirely" because obviously the compositor (or X in Awesome's case) still needs to know where to put the clients. Thankfully we can share the same representation and use the Lua state directly, like we are already doing for the drawins to render the status bar.
We'll probably need to implement the API of almost everything in this issue for the Lua libraries to call. Then we "just" grab the coordinates and other information from the client structure and render it (here is how Awesome defined it, ours will be similar potentially).
Now I'm not sure of how this interacts with standard drawins. Are they treated as clients as well? Are clients always other clients or could they just be other floating "windows" that Awesome creates (like popups and the like)? If so then that will complicate this (and if not, wee we can just stick an View
in there and do that). @psychon will probably know more.
This is definitely the biggest and ugliest API to implement, but once it is implemented tiling should "just werk".
from way-cooler.
Oh ok, what's the first thing to do?
from way-cooler.
I don't know what exactly part of the API is needed (except definitely geometry
). You can see what's necessary with the errors that are spat out on the console.
from way-cooler.
I don't know what exactly part of the API is needed (except definitely geometry).
I would guess geometry
. However, before that, clients need to be actually created for any windows that the compositor manages and the manage
signal has to be emitted (and I guess unmanage
for when they go away). I would start with implementing this and then stubbing methods until the resulting errors go away. :-)
Next step would IMO be to implement client.get
which lets Lua query the list of all clients, but this could again cause lots of errors for unimplemented APIs.
Before the above is done, the Lua code will not assign geometry to clients anyway.
Now I'm not sure of how this interacts with standard drawins.
Short version: For now this can be ignored. The only interaction that I see is "stacking order" and that can be handled much later, I guess.
Long version:
In awesome, drawins and clients "inherit" from something internal called "window". A window (basically) has a geometry (Area
in way-cooler).
Right now, the only important interaction that I can come up with is the stacking order. This is defined/handled in stack.c, but I guess could be ignored for now. Anyway: A window is assigned some layer and the order is like this:
- clients with
.type == "desktop"
at the bottom. - clients with
.below == true
- drawins with
.ontop == false
- clients not assigned to any other layer
- clients with
.above == true
- clients with
.fullscreen == true
- clients with
.ontop == true
- drawins with
.ontop == true
Oh and one more thing: transient windows (e.g. a "Open file" dialog) are ignored by the algorithm and are instead stacked ontop of their parent window.
Inside the layers, the order is basically "in order of creation". For drawins, no one yet had a reason to be able to influence this, but for clients, the C code can influence this. For this, there is a single, global list of all clients (globalconf.stack
) and Lua can influence the order in this list via client:swap(other_client)
. (And for rendering, you basically filter this list for clients that are assigned to the currently active layer)
from way-cooler.
I thought "basic tags" were done already? They can be selected and activated. The only missing piece would be :clients()
, which is a "TODO / FIXME" in src/awesome/tag.rs
, I guess (I have not checked).
from way-cooler.
Related Issues (20)
- Implement Pixbuf to surface for latest Awesome
- Restart Lua cleanly HOT 6
- Split Compositor and Awesome compatibility up HOT 17
- Use Wayland for timed callbacks instead of GLib HOT 8
- Cannot install way-cooler via cargo HOT 1
- How can we help? HOT 4
- Won't start HOT 2
- Using https on way-cooler.org HOT 1
- Executable naming conflict with AwesomeWM HOT 5
- Tests for awesome/root.rs don't use the latest API HOT 1
- Design - Class builder and wrappers in awesome APIs HOT 11
- Race condition with awesome part HOT 7
- error: multiple applicable items in scope HOT 7
- Error loudly when XWayland isn't installed HOT 2
- Thoughts on Smithhay 0.2 HOT 4
- Pin rustfmt version on CI
- wlroots 0.6 HOT 1
- Doesn't build the client, build.rs problem
- Fix CI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from way-cooler.