Conversation
b9c7722 to
4942288
Compare
- added prefix-based TOML-style headers - added conditionals to these header-based "blocks" - updated assets/config.conf, kept old config as config-legacy.conf - updated docs - updated all config keys to a general structure that makes them easily groupable, this also significantly improves configurability in nix fixed small issue with parsing to allow envs to be set and subsequently used in conditionals update gitignore moved to TOML standards (TOML configs now supported, namespacing moved from underscores to dots
a130a19 to
b9e496a
Compare
|
I tend to view the issue from the perspective of an ordinary user (not a developer). The current configuration is still the least difficult for non-developers to understand. Of course, I might be wrong, so I still pay attention to the number of likes on the issue. However, so far, it seems that not many people like this toml format, except for a few developers |
|
understood, will keep the PR around for a bit to see if it is popular, main reason for picking this format is because the current mainline mango config is already very close and it can be supported without ruining backwards compatibility. if it's better to keep the keys as underscore-split instead of dot-split (in-line with current and making the new parsing 100% optional), let me know. |
From your point of view I take it you wont like the idea of converting the configuration into scripting language like Lua for example, right? I think simplicity is great, but it comes at the cost of flexibilty (which TOML will not solve anyway) |
i've actually been thinking about how to approach this, because i do not think a scriptable config is a good idea for the average user, but i would like to provide it for power-users. currently, it's actually somewhat doable to configure mango entirely in bash/zsh/fish through mmsg! i actually have a working demo on my PC for this. this is done through the setoption dispatcher. I'm considering that it may be possible to add full "scriptable config" support without overhauling the config interpretation (which is currently a hand-rolled simple config parser, that i managed to extend with ~100 lines of logic to support most toml features). this would be done through making libraries for interacting with the mango socket via various languages (including LUA), I believe this has a pretty decent potential for working but we would need to introduce some more IPC functionality (like for example the dispatchers for border colors, borderpx and border radius i introduced in my border textures PR) basically: if we can expose more things to the IPC and allow control via the socket, we could easily make mango able to be configured in its current format, TOML and any scripting language of your choice, with language support not being maintained by the main mango project, but rather by whoever wishes to write the library implementation for it. edit: actually did some more digging and compared the concept implementation i did in bash with what you can do with hyprland, to make mango fully configurable in scripting through the ipc, the actual in-source changes that need to happen are:
these all seem to be relatively doable tweaks to mango, and once they're in, they could allow a scriptable config alongside existing config options, in any language through a library. |
|
I also don't think a full scripting language is the right fit for this project. I do like TOML though for its well defined syntax and the potential for a future schema with LSP integration while staying user-friendly compared to other options like JSON, YAML, or XML. I am also happy keeping |
I'm a bit more than average user, but not a software developer. The more I work with .toml files, the more I like them. They are easy to read, and they easily create a very neat structure by default. Current .conf files are fine for very small things, but long window rules are really hard to read, as everything just merged together. In general, WMs are for power users, thus you won't see a lot of average users using them unless it was preconfigured. .toml is definitely better than scripting languages, json, kdl approach if you want approachable config. |
|
If this PR was merged, could be have both worlds... the original config approach and this newer approach? That way, if someone (new user) wants to just get going without understanding the .toml formatting, they can get going with the default config. Ultimately, satisfying both the user/beginner and an experience use who is looking for a little more flexibility and functionality. I would love to sponsor this PR. Just my two cents... |
I've updated all config keys to a new dot-separated segment-based standard, old config keys are kept parseable as "global" keys.
new functionality:
part of example config:
for now, this is just done through some minor edits to the existing parser. In the future, it might be better to move to a premade TOML parser if the full TOML featureset is needed.