Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming ALL the settings #2708

Closed
The-Compiler opened this issue Jun 9, 2017 · 20 comments
Closed

Renaming ALL the settings #2708

The-Compiler opened this issue Jun 9, 2017 · 20 comments
Labels
component: config Issues related to configuration. priority: 0 - high Issues which are currently the primary focus.

Comments

@The-Compiler
Copy link
Member

With the current config revolution™ going on, it's a good time to rename all settings to be more consistent and clear, or do any other breaking changes. I'd like some input on that topic!

Current settings

For reference, here's how things look currently:

# general

ignore-case
startpage
yank-ignored-url-parameters
default-open-dispatcher
default-page
auto-search
auto-save-config
auto-save-interval
editor
editor-encoding
private-browsing
developer-extras
print-element-backgrounds
xss-auditing
site-specific-quirks
default-encoding
new-instance-open-target
new-instance-open-target.window
log-javascript-console
save-session
session-default-name
url-incdec-segments

# ui

history-session-interval
zoom-levels
default-zoom
downloads-position
status-position
message-timeout
message-unfocused
confirm-quit
zoom-text-only
frame-flattening
user-stylesheet
hide-scrollbar
css-media-type
smooth-scrolling
remove-finished-downloads
hide-statusbar
statusbar-padding
window-title-format
modal-js-dialog
hide-wayland-decoration
keyhint-blacklist
keyhint-delay
prompt-radius
prompt-filebrowser

# network

do-not-track
accept-language
referer-header
user-agent
proxy
proxy-dns-requests
ssl-strict
dns-prefetch
custom-headers
netrc-file

# completion

show
download-path-suggestion
timestamp-format
height
cmd-history-max-items
web-history-max-items
quick-complete
shrink
scrollbar-width
scrollbar-padding

# input

timeout
partial-timeout
insert-mode-on-plugins
auto-leave-insert-mode
auto-insert-mode
forward-unbound-keys
spatial-navigation
links-included-in-focus-chain
rocker-gestures
mouse-zoom-divider

# tabs

background-tabs
select-on-remove
new-tab-position
new-tab-position-explicit
last-close
show
show-switching-delay
wrap
movable
close-mouse-button
position
show-favicons
favicon-scale
width
pinned-width
indicator-width
tabs-are-windows
title-format
title-format-pinned
title-alignment
mousewheel-tab-switching
padding
indicator-padding

# storage

download-directory
prompt-download-directory
remember-download-directory
maximum-pages-in-cache
object-cache-capacities
offline-storage-default-quota
offline-web-application-cache-quota
offline-storage-database
offline-web-application-storage
local-storage
cache-size

# content

allow-images
allow-javascript
allow-plugins
webgl
css-regions
hyperlink-auditing
geolocation
notifications
media-capture
javascript-can-open-windows-automatically
javascript-can-close-windows
javascript-can-access-clipboard
ignore-javascript-prompt
ignore-javascript-alert
local-content-can-access-remote-urls
local-content-can-access-file-urls
cookies-accept
cookies-store
host-block-lists
host-blocking-enabled
host-blocking-whitelist
enable-pdfjs

# hints

border
mode
chars
min-chars
scatter
uppercase
dictionary
auto-follow
auto-follow-timeout
next-regexes
prev-regexes
find-implementation
hide-unmatched-rapid-hints

# colors

completion.fg
completion.bg
completion.alternate-bg
completion.category.fg
completion.category.bg
completion.category.border.top
completion.category.border.bottom
completion.item.selected.fg
completion.item.selected.bg
completion.item.selected.border.top
completion.item.selected.border.bottom
completion.match.fg
completion.scrollbar.fg
completion.scrollbar.bg
statusbar.fg
statusbar.bg
statusbar.fg.private
statusbar.bg.private
statusbar.fg.insert
statusbar.bg.insert
statusbar.fg.command
statusbar.bg.command
statusbar.fg.command.private
statusbar.bg.command.private
statusbar.fg.caret
statusbar.bg.caret
statusbar.fg.caret-selection
statusbar.bg.caret-selection
statusbar.progress.bg
statusbar.url.fg
statusbar.url.fg.success
statusbar.url.fg.success.https
statusbar.url.fg.error
statusbar.url.fg.warn
statusbar.url.fg.hover
tabs.fg.odd
tabs.bg.odd
tabs.fg.even
tabs.bg.even
tabs.fg.selected.odd
tabs.bg.selected.odd
tabs.fg.selected.even
tabs.bg.selected.even
tabs.bg.bar
tabs.indicator.start
tabs.indicator.stop
tabs.indicator.error
tabs.indicator.system
hints.fg
hints.bg
hints.fg.match
downloads.bg.bar
downloads.fg.start
downloads.bg.start
downloads.fg.stop
downloads.bg.stop
downloads.fg.system
downloads.bg.system
downloads.fg.error
downloads.bg.error
webpage.bg
keyhint.fg
keyhint.fg.suffix
keyhint.bg
messages.fg.error
messages.bg.error
messages.border.error
messages.fg.warning
messages.bg.warning
messages.border.warning
messages.fg.info
messages.bg.info
messages.border.info
prompts.fg
prompts.bg
prompts.selected.bg

# fonts

_monospace
completion
completion.category
tabbar
statusbar
downloads
hints
debug-console
web-family-standard
web-family-fixed
web-family-serif
web-family-sans-serif
web-family-cursive
web-family-fantasy
web-size-minimum
web-size-minimum-logical
web-size-default
web-size-default-fixed
keyhint
messages.error
messages.warning
messages.info
prompts

New

With the new config, there won't be any sections anymore, instead there are dotted "paths" to settings. After a quick first look, they could look something like this:

aliases
auto_search
confirm_quit
default_page
history_session_interval
ignore_case
new_instance_open_target
new_instance_open_target_window
url_incdec_segments
searchengines
session_default_name
start_page
yank_ignored_url_parameters

auto_save.config
auto_save.interval
auto_save.session

colors.completion.alternate_bg
colors.completion.bg
colors.completion.category.bg
colors.completion.category.border.bottom
colors.completion.category.border.top
colors.completion.category.fg
colors.completion.fg
colors.completion.item.selected.bg
colors.completion.item.selected.border.bottom
colors.completion.item.selected.border.top
colors.completion.item.selected.fg
colors.completion.match.fg
colors.completion.scrollbar.bg
colors.completion.scrollbar.fg
colors.downloads.bg.bar
colors.downloads.bg.error
colors.downloads.bg.start
colors.downloads.bg.stop
colors.downloads.bg.system
colors.downloads.fg.error
colors.downloads.fg.start
colors.downloads.fg.stop
colors.downloads.fg.system
colors.hints.bg
colors.hints.fg
colors.hints.match.fg
colors.keyhint.bg
colors.keyhint.fg
colors.keyhint.suffix.fg
colors.messages.bg.error
colors.messages.bg.info
colors.messages.bg.warning
colors.messages.border.error
colors.messages.border.info
colors.messages.border.warning
colors.messages.fg.error
colors.messages.fg.info
colors.messages.fg.warning
colors.prompts.bg
colors.prompts.fg
colors.prompts.selected.bg
colors.statusbar.bg.caret
colors.statusbar.bg.caret_selection
colors.statusbar.bg.command
colors.statusbar.bg.command_private
colors.statusbar.bg.insert
colors.statusbar.bg.normal
colors.statusbar.bg.private
colors.statusbar.fg.caret
colors.statusbar.fg.caret_selection
colors.statusbar.fg.command
colors.statusbar.fg.command_private
colors.statusbar.fg.insert
colors.statusbar.fg.normal
colors.statusbar.fg.private
colors.statusbar.progress.bg
colors.statusbar.url.fg
colors.statusbar.url.fg.error
colors.statusbar.url.fg.hover
colors.statusbar.url.fg.warn
colors.statusbar.url.success.http.fg
colors.statusbar.url.success.https.bg
colors.tabs.bg.bar
colors.tabs.bg.even
colors.tabs.bg.odd
colors.tabs.bg.selected.even
colors.tabs.bg.selected.odd
colors.tabs.fg.even
colors.tabs.fg.odd
colors.tabs.fg.selected.even
colors.tabs.fg.selected.odd
colors.tabs.indicator.error
colors.tabs.indicator.start
colors.tabs.indicator.stop
colors.tabs.indicator.system
colors.webpage.bg

completion.cmd_history_max_items
completion.height
completion.quick
completion.scrollbar.padding
completion.scrollbar.width
completion.show
completion.shrink
completion.timestamp_format
completion.web_history_max_items

content.accept_language
content.cache_size
content.cookies.accept
content.custom_headers
content.default_encoding
content.developer_extras
content.dns_prefetch
content.do_not_track
content.frame_flattening
content.geolocation
content.host_blocking.enabled
content.host_blocking.lists
content.host_blocking.whitelist
content.hyperlink_auditing
content.images
content.javascript
content.javascript.alert
content.javascript.can_access_clipboard
content.javascript.can_close_windows
content.javascript.can_open_windows_automatically
content.javascript.log
content.javascript.modal_dialog
content.javascript.prompt
content.local_content_can_access_file_urls
content.local_content_can_access_remote_urls
content.local_storage
content.maximum_pages_in_cache
content.media_capture
content.netrc_file
content.notifications
content.offline_web_application_cache
content.pdfjs
content.plugins
content.print_element_backgrounds
content.private_browsing
content.proxy
content.proxy_dns_requests
content.referer_header
content.ssl_strict
content.user_agent
content.user_stylesheet
content.webgl
content.xss_auditing
cookies.cookies.store

downloads.location.directory
downloads.location.prompt
downloads.location.remember
downloads.open_dispatcher
downloads.path_suggestion
downloads.position
downloads.remove_finished

editor.command
editor.encoding

fonts.completion.category
fonts.completion.entry
fonts.debug_console
fonts.downloads
fonts.hints
fonts.keyhint
fonts.messages.error
fonts.messages.info
fonts.messages.warning
fonts.monospace
fonts.prompts
fonts.statusbar
fonts.tabbar
fonts.web.family.cursive
fonts.web.family.fantasy
fonts.web.family.fixed
fonts.web.family.sans_serif
fonts.web.family.serif
fonts.web.family.standard
fonts.web.size.default
fonts.web.size.default_fixed
fonts.web.size.minimum
fonts.web.size.minimum_logical

hints.auto_follow
hints.auto_follow_timeout
hints.border
hints.chars
hints.dictionary
hints.find_implementation
hints.hide_unmatched_rapid_hints
hints.min_chars
hints.mode
hints.next_regexes
hints.prev_regexes
hints.scatter
hints.uppercase

input.ambiguous_timeout
input.forward_unbound_keys
input.insert_mode.auto_focused
input.insert_mode.auto_leave
input.insert_mode.plugins
input.links_included_in_focus_chain
input.partial_timeout
input.rocker_gestures
input.spatial_navigation

keyhint.blacklist
keyhint.delay

messages.timeout
messages.unfocused

prompt.filebrowser
prompt.radius

scrolling.bar
scrolling.smooth

statusbar.position
statusbar.hide
statusbar.padding

tabs.background
tabs.close_mouse_button
tabs.favicons.scale
tabs.favicons.show
tabs.indicator_padding
tabs.last_close
tabs.mousewheel_switching
tabs.movable
tabs.new_position
tabs.new_position_explicit
tabs.padding
tabs.position
tabs.select_on_remove
tabs.show
tabs.show_switching_delay
tabs.tabs_are_windows
tabs.title.alignment
tabs.title.format
tabs.title.format_pinned
tabs.width.bar
tabs.width.indicator
tabs.width.pinned
tabs.wrap

window.hide_wayland_decoration
window.title_format

zoom.default
zoom.levels
zoom.mouse_divider
zoom.text_only

I've tried to group related settings together, but there are still a few oddballs at the top.
Compared with the previous sections, more stuff is in content (notably, stuff which was in network or general before), ui is gone, and there are some more fine-grained groups.

What do you think? What would you do differently? What setting name (or possible values) have you always found confusing? I personally think new_instance_open_target and tabs.new_position_explicit need a new name, but I don't know what yet...

@The-Compiler The-Compiler added component: config Issues related to configuration. config revolution priority: 0 - high Issues which are currently the primary focus. labels Jun 9, 2017
@krobelus
Copy link

krobelus commented Jun 9, 2017

nice to see this :) I think it is very good to be able to search the config options by full name

@notbenh
Copy link

notbenh commented Jun 9, 2017

I am a fan of the proposed explicit grouping as it's clear and allows for the notion of both sub configs (as illustrated in fonts.web...) but also might make it simple to express something as a domain specific config ( for example content.cookies.accept = no ... url(some.site.com).content.cookies.accept = yes )

That said though it would imply that every config should live in a group, for the oddballs at the top would 'browser' be an acceptable label?

@The-Compiler
Copy link
Member Author

@notbenh That syntax isn't going to work, but there are some other plans to enable per-domain settings - they're documented in #499 for the most part, and unrelated to this in my eyes.

That said though it would imply that every config should live in a group, for the oddballs at the top would 'browser' be an acceptable label?

Why would it?

@nishantjr
Copy link

nishantjr commented Jun 9, 2017

I like this!

colors.downloads.bg.bar
colors.downloads.bg.error
...
statusbar.fg.private
statusbar.bg.private

Could these be colors.downloads.bar.bg for consistency?

I'm thinking some kind of "formula" would be nice. Perhaps:

object     = statusbar | messages | downloads
subobject  = bar  | category | item ...
conditions = even | odd      | selected | error ...
what       = bg   | fg       | border

colors.[object].[subobject].[conditions].[what]

@jgkamat
Copy link
Member

jgkamat commented Jun 9, 2017

That said though it would imply that every config should live in a group, for the oddballs at the top would 'browser' be an acceptable label?

I would vote for qute.* or misc.*. I do think they should have a category, it feels a little bit weird to have top level config options.

@Ambrevar
Copy link

Ambrevar commented Jun 9, 2017

Why? Neither qute nor misc add information, plus not all options belong together. Making them part of the same set would be misleading.

Don't complexify with hierarchies when there is no need for it. Keep it simple.

@notbenh
Copy link

notbenh commented Jun 9, 2017

re: why I feel should everything be grouped:
1: I'm unclear how having one way is adding complexity?
2: By creating a tree you are implying structure. Thus is the suggesting that the one off of ignore_case and grouping of all thecolors should be peers? To me it seems that the peers here would be colors and qute|misc|browser|... that could have ignore_case as a member.

In the end, I'm not going to write the change so it's not something that I'm going to fight for. It is just a config structure, so even with un-grouped one-offs it's still going to work.

@swolegoal
Copy link

swolegoal commented Jun 10, 2017 via email

@demure
Copy link

demure commented Jun 10, 2017

Depending on how you will be doing the per-domain settings, we could copy weechat's style of having a inheritable default and a specific setting having their domain prepended:

default.content.cookies.accept = yes
google.content.cookies.accept = no

@The-Compiler
Copy link
Member Author

@nishantjr I agree, good catch! I've changed things accordingly in 371c15a, see configdata.yml for the newest version.

As for adding a hierarchy for the oddballs, I'll have to agree with @Ambrevar and others above - I don't think adding something like general. or behavior. or qute. or browser. to them is an improvement.

Anything else? Any ideas about what to do with new_instance_open_target and tabs.new_position_explicit (and maybe others?) which don't really have intuitive names?

@ninewise
Copy link
Contributor

Things I'd change:

  1. regroup window, zoom, statusbar, scrolling, prompt, messages, keyhint, fonts, colors. e.g.:
    window
        colors...
        fonts...
        interaction
            keyhint...
            messages...
            prompt...
        scrolling...
        statusbar
        hide_wayland_decoration
        title_format
        zoom...
    
  2. add an "instance" cathegory (by lack of a better name) for new
    instance related stuff:
    • confirm_quit
    • default_page
    • cli_open_method (how to open new links from the cli, so new-instance-open-target)
    • cli_open_window (in what window to open tabs in case above setting is a "tab", so new-instance-open-target.window)
    • start_page

I once again forgot what the "explicit" means in new_position_explicit, so I can't really do anything but admit the problem.

@lahwaacz
Copy link
Contributor

I once again forgot what the "explicit" means in new_position_explicit, so I can't really do anything but admit the problem.

If I remember correctly, new_position affects the position of tabs opened by webkit or webengine (e.g. when you middle-click), while new_position_explicit affects the position of tabs opened by qutebrowser (e.g. :open -t <url> and qutebrowser <url>).

@The-Compiler
Copy link
Member Author

What @lahwaacz says sounds about right.

If you check the behavior in Chromium, Ctrl-clicking a link opens a tab to the right of the current one ("not explicit", i.e. it's a "child" of the current tab), but doing ctrl-t opens a tab at the far right ("explicit", i.e. it's really a new unrelated tab).

Maybe new_tab_position.unrelated and new_tab_position.related would already make things clearer? Still not 100% happy though...

@lahwaacz
Copy link
Contributor

What about new_tab_position and new_subtab_position?

@The-Compiler The-Compiler added this to Backlog in Config revolution Jun 19, 2017
@The-Compiler The-Compiler moved this from Backlog to Done in Config revolution Jun 19, 2017
@The-Compiler The-Compiler moved this from Done to Backlog in Config revolution Jun 19, 2017
@The-Compiler The-Compiler moved this from Backlog to Need triage in Config revolution Jun 19, 2017
@The-Compiler
Copy link
Member Author

@NoctuaNivalis Thanks for the suggestions there, but I decided I actually don't like them (sorry! 😆). I find it difficult to say what actually belongs to "window"/"instance" and what doesn't with your proposal.

As for the new_tab_position, I went for my .related/.unrelated proposal above - it makes it clear that there's a distinction, and Firefox has browser.tabs.insertRelatedAfterCurrent too, so it can't be too far off.

I'll take another look at configdata.yml now, and look at it again later to make sure I didn't miss anything - but other than that, I consider this done.

@The-Compiler
Copy link
Member Author

I also just updated the settings docs for the new config- might be nicer way to look at them 😉

@The-Compiler
Copy link
Member Author

The-Compiler commented Jul 2, 2017

I think I actually found a "group" for most of the oddball settings which doesn't feel completely arbitrary: url.

For url_incdec_segments (now url.incdec_segments) and yank_ignored_url_parameters (now url.yank_ignored_parameters) I think it's clear that it fits.

For auto_search, searchengines, default_page and start_pages I also think it's a pretty good fit - they're all about what happens when you use :open and don't enter an URL (or if what you entered should be handled as URL or not).

I also moved new_instance_open_target and new_instance_open_target_window under it - because they're about what happens when you open an URL from an external application. Still thinking about how to name those... Maybe url.external_* instead of new_instance?

This leaves us with aliases, confirm_quit, history_session_interval, ignore_case and session_default_name. I think it's okay to keep them as-is.

@lahwaacz
Copy link
Contributor

lahwaacz commented Jul 2, 2017

I also moved new_instance_open_target and new_instance_open_target_window under it - because they're about what happens when you open an URL from an external application.

That's arguable at best - for example, the new_tab_position setting discussed previously is about what happens when you open a URL from within qutebrowser.

@The-Compiler
Copy link
Member Author

Hm, yeah, you're right. It's definitely more of a stretch than I thought. I reversed that part.

@The-Compiler
Copy link
Member Author

I did some more changes:

  • history_session_interval -> history_gap_interval (because "session" is already overloaded enough)
  • content.javascript.can_close_windows (and .can_open_windows_automatically) -> .can_close_tabs (because they aren't actually new windows in qutebrowser)
  • A new .headers subgroup for content:
    • content.accept_language -> content.headers.accept_language
    • content.custom_headers -> content.headers.custom
    • content.do_not_track -> content.headers.do_not_track
    • content.referer -> content.headers.referer
    • content.user_agent -> content.headers.user_agent
  • A new .cache subgroup for `content:
    • content.cache_size -> content.cache.size
    • content.maximum_pages_in_cache -> content.cache.maximum_pages
    • content.offline_web_application_cache -> content.cache.appcache

Pretty satisfied so far. Still open for feedback, though.

@The-Compiler The-Compiler moved this from Need triage to Before merge in Config revolution Jul 6, 2017
@The-Compiler The-Compiler moved this from Need triage to Done in Config revolution Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: config Issues related to configuration. priority: 0 - high Issues which are currently the primary focus.
Projects
No open projects
Development

No branches or pull requests

10 participants