[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 41a3155319 7/7: Improve wallpaper.el docs for recent changes
From: |
Stefan Kangas |
Subject: |
master 41a3155319 7/7: Improve wallpaper.el docs for recent changes |
Date: |
Wed, 14 Sep 2022 05:19:43 -0400 (EDT) |
branch: master
commit 41a31553197911b6ccdb5da93801ff63cef9b3cf
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Improve wallpaper.el docs for recent changes
* lisp/image/wallpaper.el: Fix documentation to better reflect that no
external command is needed on Haiku.
* etc/NEWS: Update entry on wallpaper.el.
---
etc/NEWS | 13 ++++++++++---
lisp/image/wallpaper.el | 30 ++++++++++++++++++++++--------
2 files changed, 32 insertions(+), 11 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 82168038c3..7505a37c06 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1991,9 +1991,16 @@ This is done via 'image-converter-add-handler'.
---
*** New library wallpaper.el.
-This library contains the command `wallpaper-set', which uses an
-external command to set the desktop background. The new user option
-`wallpaper-commands' controls which command is being used.
+This library contains the command `wallpaper-set', which sets the
+desktop background.
+
+On GNU/Linux and other Unix-like systems, it uses an external command
+(such as "swaybg", "gm", "display" or "xloadimage"). A suitable
+command should be detected automatically in most cases, but can also
+be customized manually with the new user option `wallpaper-commands'.
+
+On Haiku, it uses the new function `haiku-set-wallpaper', which does
+not rely on any external command.
** Image-Dired
diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el
index a2b51d68d7..172164fdf9 100644
--- a/lisp/image/wallpaper.el
+++ b/lisp/image/wallpaper.el
@@ -1,4 +1,4 @@
-;;; wallpaper.el --- Set wallpaper using external command -*-
lexical-binding: t; -*-
+;;; wallpaper.el --- Set desktop wallpaper from Emacs -*- lexical-binding: t;
-*-
;; Copyright (C) 2022 Free Software Foundation, Inc.
@@ -22,13 +22,20 @@
;;; Commentary:
-;; This library provides the command `wallpaper-set', which uses an
-;; external command to set the desktop background. This is obviously
-;; a bit tricky to get right, as there is no lack of platforms, window
-;; managers, desktop environments and tools.
+;; This library provides the command `wallpaper-set', which sets the
+;; desktop background.
;;
-;; If this doesn't work in your environment, customize the user option
-;; `wallpaper-commands'.
+;; 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.
+;;
+;; 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 option `wallpaper-commands'.
;;; Code:
@@ -130,7 +137,14 @@ See also `wallpaper-default-width'.")
(read-number (format "Wallpaper %s in pixels: " desc) default)))
(defun wallpaper-set (file)
- "Set the desktop background to FILE in a graphical environment."
+ "Set the desktop background to FILE in a graphical environment.
+
+On GNU/Linux and other Unix-like systems, this relies on an
+external command. Which command is being used depends on the
+user option `wallpaper-commands'.
+
+On Haiku, 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: "
- master updated (d0b2eee278 -> 41a3155319), Stefan Kangas, 2022/09/14
- master ac479598f1 5/7: * lisp/image/wallpaper.el (wallpaper-commands): Add xwallpaper., Stefan Kangas, 2022/09/14
- master 41a3155319 7/7: Improve wallpaper.el docs for recent changes,
Stefan Kangas <=
- master bfafe4aacc 6/7: Allow setting wallpaper from TTY, Stefan Kangas, 2022/09/14
- master fd70791218 1/7: Add new function xdg-current-desktop to xdg.el, Stefan Kangas, 2022/09/14
- master 7d315ce630 2/7: ; * etc/NEWS: Improve wording of 'xdg-state-home' entry., Stefan Kangas, 2022/09/14
- master 6f06353290 4/7: Support recent KDE Plasma in wallpaper.el, Stefan Kangas, 2022/09/14
- master d537e4c102 3/7: Fix desktop environment check on Ubuntu, Stefan Kangas, 2022/09/14