nyxt icon indicating copy to clipboard operation
nyxt copied to clipboard

Make the download directory definable on the fly

Open vindarel opened this issue 6 years ago • 1 comments

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.

vindarel avatar Sep 19 '19 17:09 vindarel

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?

Ambrevar avatar Sep 19 '19 18:09 Ambrevar