diff options
| author | Craig Jennings <c@cjennings.net> | 2025-10-15 17:44:30 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-10-15 17:44:30 -0500 |
| commit | 276491a539a272b12c0ae30a65ebfc7217944b2d (patch) | |
| tree | 6776f741bb77d88cfa4eb4f46339397caa953359 /modules | |
| parent | 16a2f87a246f60367472f5f52f8493aeec9169a9 (diff) | |
| download | dotemacs-276491a539a272b12c0ae30a65ebfc7217944b2d.tar.gz dotemacs-276491a539a272b12c0ae30a65ebfc7217944b2d.zip | |
add dwim shell command for optimizing for email
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/dwim-shell-config.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/dwim-shell-config.el b/modules/dwim-shell-config.el index a1ace2be3..2865dd86a 100644 --- a/modules/dwim-shell-config.el +++ b/modules/dwim-shell-config.el @@ -713,11 +713,17 @@ Supports docx, odt, and other pandoc-compatible formats." (cj/xdg-open output-file) (message "Opened %s" output-file))))))) - +(defun cj/dwim-shell-commands-optimize-image-for-email () + "Optimize image(s) for email - reduces file size while maintaining quality. +Resizes to max 1200px (only if larger), strips metadata, and applies JPEG optimization." + (interactive) + (dwim-shell-command-on-marked-files + "Optimize for email" + "magick '<<f>>' -strip -resize '1200x1200>' -quality 85 -interlace Plane -colorspace sRGB -sampling-factor 4:2:0 '<<fne>>_email.<<e>>'" + :utils "magick")) (defun cj/dwim-shell-commands-kill-gpg-agent () "Kill (thus restart) gpg agent. - Useful for when you get this error: gpg: public key decryption failed: No pinentry gpg: decryption failed: No pinentry" |
