Add a shorthand for pattern/URL settings to ConfigContainer #3724
Labels
component: config
Issues related to configuration.
component: style / refactoring
Issues related to coding styles or code that should be refactored.
priority: 3 - wishlist
Issues which are not important and/or where it's unclear whether they're feasible.
Currently, there are two ways to set settings for an URL:
And in qutebrowser code, there's
config.instance.get_obj(..., url=...)
andconfig.instance.get_obj_for_pattern(..., url=...)
.I've been discussing with @toofar about possible alternatives which would make both easier (and more consistent with the shorthand for global settings). So far, two things came to mind:
ConfigContainer
- inconfig.py
: c[pattern].content.images = False;
config.val[url].content.images`. However, that can't tell URL/pattern apart and might be a bit much magic.url(...)
andpattern(...)
methods onConfigContainer
:c.pattern(...).content.images = False
andconfig.val.url(...).content.images
(or maybefor_url
andfor_pattern
).Not sure yet about what to do (if anything at all) and what'd happen with the old syntax - just leaving this here as some food for thought.
The text was updated successfully, but these errors were encountered: