~mil/sxmo-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
4 3

[PATCH sxmo-utils v3 0/2] Support system wallpapers

Details
Message ID
<20240209080954.18349-4-contact@willowbarraco.fr>
DKIM signature
pass
Download raw message
Change of the installed_wallappers implementation.

[PATCH sxmo-utils v3 1/2] sxmo_common.sh: xdg_data_path handle escaped separators (\n, \0)

Details
Message ID
<20240209080954.18349-5-contact@willowbarraco.fr>
In-Reply-To
<20240209080954.18349-4-contact@willowbarraco.fr> (view parent)
DKIM signature
pass
Download raw message
Patch: +1 -1
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
---
 scripts/core/sxmo_common.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/core/sxmo_common.sh b/scripts/core/sxmo_common.sh
index 4eb0a1f9..1aed3152 100755
--- a/scripts/core/sxmo_common.sh
+++ b/scripts/core/sxmo_common.sh
@@ -65,7 +65,7 @@ xdg_data_path() {
				break
			fi
			if [ $instance -gt 0 ]; then
				printf '%s' "${sep}"
				printf '%b' "${sep}"
			fi
			printf '%s' "${dir}/${filepath}"
			instance=$((instance+1))
-- 
2.43.0

[PATCH sxmo-utils v3 2/2] Support system wallpapers

Details
Message ID
<20240209080954.18349-6-contact@willowbarraco.fr>
In-Reply-To
<20240209080954.18349-4-contact@willowbarraco.fr> (view parent)
DKIM signature
pass
Download raw message
Patch: +25 -1
This add a simple hook "wallpaper" that by default grab the system
wallpaper (ex: provided by postmarketos-artwork-wallpapers). If there is
none, it fallback to the sxmo one.

Of course, the hook is customizable by the user if needed.

Ref: https://gitlab.com/postmarketOS/pmaports/-/issues/2499
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
---
 configs/appcfg/profile_template              |  2 +-
 configs/default_hooks/sxmo_hook_wallpaper.sh | 23 ++++++++++++++++++++
 docs/sxmo.7.scd                              |  1 +
 3 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100755 configs/default_hooks/sxmo_hook_wallpaper.sh

diff --git a/configs/appcfg/profile_template b/configs/appcfg/profile_template
index bed7542d..c811f304 100755
--- a/configs/appcfg/profile_template
+++ b/configs/appcfg/profile_template
@@ -70,4 +70,4 @@ export SXMO_RINGNUMBER=10
export SXMO_DEFAULT_DRAFT="Enter new message here."

#Set background image
export SXMO_BG_IMG="$(xdg_data_path sxmo/background.jpg)"
export SXMO_BG_IMG="$(sxmo_hook_wallpaper.sh)"
diff --git a/configs/default_hooks/sxmo_hook_wallpaper.sh b/configs/default_hooks/sxmo_hook_wallpaper.sh
new file mode 100755
index 00000000..82a52740
--- /dev/null
+++ b/configs/default_hooks/sxmo_hook_wallpaper.sh
@@ -0,0 +1,23 @@
#!/bin/sh -e
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2022 Sxmo Contributors

# shellcheck source=scripts/core/sxmo_common.sh
. sxmo_common.sh

# This script is executed once, and must output the wallpaper to display

installed_wallpapers() {
	xdg_data_path wallpapers 0 "\0" | xargs -r0I{} find "{}" -name "$SXMO_OS.*"
}

sxmo_wallpaper() {
	xdg_data_path sxmo/background.jpg
}

all_wallpapers() {
	installed_wallpapers
	sxmo_wallpaper
}

all_wallpapers | head -n1
diff --git a/docs/sxmo.7.scd b/docs/sxmo.7.scd
index 898dafe4..6a30d76f 100644
--- a/docs/sxmo.7.scd
+++ b/docs/sxmo.7.scd
@@ -87,6 +87,7 @@ shell scripts that glue all these tools together. All these shell scripts comply
to the pattern *sxmo_\*.sh* and most can be found in your */usr/bin/* directory.

HOOKS: _sxmo_hook_start.sh_ (what executes on startup)
_sxmo_hook_wallpaper.sh_ (give the displayed wallpaper file path)

SEE ALSO: _tinydm_(1), _superd_(1), _sxmo_daemons.sh_(1)

-- 
2.43.0

[sxmo-utils/patches/test.yml] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CZ0E9HRU0M0I.6BGCEEWKR3Q4@fra02>
In-Reply-To
<20240209080954.18349-6-contact@willowbarraco.fr> (view parent)
DKIM signature
missing
Download raw message
sxmo-utils/patches/test.yml: SUCCESS in 10s

[Support system wallpapers][0] v3 from [Willow Barraco][1]

[0]: https://lists.sr.ht/~mil/sxmo-devel/patches/49309
[1]: contact@willowbarraco.fr

✓ #1146363 SUCCESS sxmo-utils/patches/test.yml https://builds.sr.ht/~mil/job/1146363

Re: [PATCH sxmo-utils v3 2/2] Support system wallpapers

Details
Message ID
<CZABOSKQ7DVA.15FLZGXGXCW8A@momi.ca>
In-Reply-To
<20240209080954.18349-6-contact@willowbarraco.fr> (view parent)
DKIM signature
pass
Download raw message
Thanks!

To git@git.sr.ht:~mil/sxmo-utils
   df6b3d3..c6efaf8  master -> master
 
--
w:] www.momi.ca
pgp:] https://momi.ca/publickey.txt
Reply to thread Export thread (mbox)