Document MS-Windows support in wallpaper.el

* lisp/image/wallpaper.el: Add MS-Windows to Commentary.
(wallpaper-command, wallpaper-command-args, wallpaper-set):
Document MS-Windows support.
This commit is contained in:
Stefan Kangas 2022-09-15 19:12:10 +02:00
parent 3ba47a0782
commit 4907859ee0
2 changed files with 18 additions and 16 deletions

View file

@ -2467,8 +2467,8 @@ This package provides the command 'wallpaper-set', which sets the
desktop background image. Depending on the system and the desktop,
this may require an external program (such as 'swaybg', 'gm',
'display' or 'xloadimage'). If so, a suitable command should be
detected automatically in most cases, and can also be customized
manually if needed using the new user options 'wallpaper-command' and
detected automatically in most cases. It can also be customized
manually if needed, using the new user options 'wallpaper-command' and
'wallpaper-command-args'.
+++

View file

@ -28,19 +28,21 @@
;; On GNU/Linux and other Unix-like systems, it uses an external
;; command to set the desktop background.
;;
;; On Haiku, it uses the `haiku-set-wallpaper' function, which does
;; not rely on any external commands.
;;
;; On macOS, the "osascript" command is used. You might need to
;; disable the option "Change picture" in the "Desktop & Screensaver"
;; preferences for this to work (this was seen with macOS 10.13).
;;
;; Finding an external command to use is obviously a bit tricky to get
;; right, as there is no lack of platforms, window managers, desktop
;; environments and tools. However, it should be detected
;; automatically in most cases. If it doesn't work in your
;; environment, customize the user options `wallpaper-command' and
;; `wallpaper-command-args'.
;;
;; On MS-Windows, it uses the `w32-set-wallpaper' function, and on
;; Haiku the `haiku-set-wallpaper' function, neither of which relies
;; on any external commands. The value of `wallpaper-command' and
;; `wallpaper-command-args' are ignored on such systems.
;;
;; On macOS, the "osascript" command is used. You might need to
;; disable the option "Change picture" in the "Desktop & Screensaver"
;; preferences for this to work (this was seen with macOS 10.13).
;;; Code:
@ -131,7 +133,7 @@ Used to set `wallpaper-command'."
(wallpaper--find-command-arguments))))
(defcustom wallpaper-command (wallpaper--find-command)
"Executable used for setting the wallpaper.
"Executable used by `wallpaper-set' for setting the wallpaper.
A suitable command for your environment should be detected
automatically, so there is usually no need to customize this.
@ -147,8 +149,8 @@ hear about it! Please send an email to bug-gnu-emacs@gnu.org and
tell us the command (and all options) that worked for you. You
can also use \\[report-emacs-bug].
The value of this variable is ignored on Haiku systems, where a
native API will be used instead (see `haiku-set-wallpaper')."
The value of this variable is ignored on MS-Windows and Haiku
systems, where a native API is used instead."
:type
'(choice
(radio
@ -186,8 +188,8 @@ returned by `display-pixel-width').
If `wallpaper-set' is run from a TTY frame, it will prompt for a
height and width for \"%h\" and \"%w\" instead.
The value of this variable is ignored on Haiku systems, where a
native API will be used instead (see `haiku-set-wallpaper')."
The value of this variable is ignored on MS-Windows and Haiku
systems, where a native API is used instead."
:type '(repeat string)
:group 'image
:version "29.1")
@ -233,8 +235,8 @@ external command. Which command to use is automatically detected
in most cases, but can be manually customized with the user
options `wallpaper-command' and `wallpaper-command-args'.
On Haiku, no external command is needed, so the value of
`wallpaper-commands' is ignored."
On MS-Windows and Haiku systems, no external command is needed,
so the value of `wallpaper-commands' is ignored."
(interactive (list (and
(display-graphic-p)
(read-file-name "Set desktop background to: "