Comments (5)
Why not just list all the options in the struct, and allow Lua IPC methods to construct one from the init file? We could have a FromJson
implementation if you wanted IPC clients to be able to reset the tree options (which I don't think would be worth it).
from way-cooler.
For reseting the tree options a better solution would to just have that happen during in-place restart. Yeah a struct with just the bare options would be fine, though I want to ensure that the option struct is there from the beginning after reading the options from the config file, because there may be no sane default for a configuration option.
from way-cooler.
Cause what I'm thinking is something like this:
// This can all be in the tree initialization, which will be called from callbacks after compositor is initialized
// options from init file loaded into registry
let fullscreen_request_option: bool = registry.get('ignore_client_fullscreen_request')
.unwrap_or_else(false);
// more options from the registry
let tree_option = TreeOption::builder().fullscreen_request(fullscreen_request_option).some_other_option(5).build();
// Then construct the tree and pass it these options. The tree exposes it so that people can modify it via a Tree command
And then for the TreeOption
I was thinking some macro like the following to make it easy to add methods to the builder:
tree_options! {
fullscreen_request, String, required;
// this will wrap some_other_option in an `Option` automatically, whenever you get it there's the chance it's not there.
some_other_option, u32, optional;
}
from way-cooler.
Given #91, we have to figure out how to move our API/registry over to d-bus. Tree settings could be an object in our dbus path, for example. We will need similar structures in many places - layout, background, window decorations, themes, window rules, IPC, etc. We should figure out how we should design those systems before switching.
from way-cooler.
Right, but the way that this data is transferred shouldn't change how it's represented in the tree code. I.E Tree will be reading some options struct that will be updated externally, and on each redraw will consult it to know how to draw/what to draw/how to organize the layout. It is possible to work concurrently on this, but if you think this is blocked by that please feel free to instead use the "blocked" tag or to consider moving it to a trello board if you think it's too long-term.
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
- The Tiling Layer HOT 6
- 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.