nyxt
nyxt copied to clipboard
Make the download directory definable on the fly
I'd like to write a before-download hook to sort the downloaded files accordingly to their extension.
I'll need to re-define the download directory target on the fly and that doesn't seem possible now.
My goal is something like
(let ((download-manager:*download-directory* …))
but the existing parameter is only a fallback.
Indeed. We could add a parameter which defaults to the empty string, and if set, then default-download-directory returns it.
Otherwise what about customizing the download function itself?
Or resource-query-function? We could add a hook to the `request-resource' dbus method to allow the users to set their resource-query-function depending on the resource. Sounds useful, nah?