only scale the image down, but up as well. It is bound to "s w" in
Image Mode by default.
+---
+*** New command 'image-mode-wallpaper-set'.
+This command sets the desktop background to the current image. It is
+bound to "W" by default.
+
+++
*** 'image-transform-fit-to-(height|width)' are now obsolete.
Use the new command 'image-transform-fit-to-window' instead.
---
*** New command 'image-dired-wallpaper-set'.
-This command sets the wallpaper to the image at point in the thumbnail
-buffer. It is bound to 'W' by default.
+This command sets the desktop background to the image at point in the
+thumbnail buffer. It is bound to 'W' by default.
---
*** 'image-dired-slideshow-start' is now bound to 'S'.
(require 'image)
(require 'exif)
(require 'dired)
+(require 'wallpaper)
(eval-when-compile (require 'cl-lib))
;;; Image mode window-info management.
"S-SPC" #'image-scroll-down
"DEL" #'image-scroll-down
+ ;; Misc
+ "W" #'image-mode-wallpaper-set
+
;; Remapped
"<remap> <forward-char>" #'image-forward-hscroll
"<remap> <backward-char>" #'image-backward-hscroll
(prog1 (bookmark-default-handler bmk)
(when (not (string= image-type (bookmark-prop-get bmk 'image-type)))
(image-toggle-display))))
+
+\f
+;;; Setting the wallpaper
+
+(defun image-mode-wallpaper-set ()
+ "Set the desktop background to the current image.
+This uses `wallpaper-set' (which see)."
+ (interactive nil image-mode)
+ (wallpaper-set buffer-file-name))
+
\f
+;;; Image transformation
(defsubst image-transform-width (width height)
"Return the bounding box width of a rotated WIDTH x HEIGHT rectangle.