diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index 90e95d8c8..90b2419e3 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -52,9 +52,12 @@ ((featurep! :completion vertico) #'completing-read) (t #'ido-completing-read)) mu4e-attachment-dir - (expand-file-name (or (getenv "XDG_DOWNLOAD_DIR") - "Downloads") - "~") + (if (executable-find "xdg-user-dir") + ;; remove trailing newline + (substring (shell-command-to-string "xdg-user-dir DOWNLOAD") 0 -1) + (expand-file-name (or (getenv "XDG_DOWNLOAD_DIR") + "Downloads") + "~")) ;; no need to ask mu4e-confirm-quit nil mu4e-headers-thread-single-orphan-prefix '("─>" . "─▶")