10 Commits

Author SHA1 Message Date
Uyanide 9a6fa483a5 ⬆️ bump to v2.1.0
Release / Build ArchLinux Package (push) Successful in 1m3s
Release / Publish to Gitea Release (push) Successful in 3s
Release / Publish to AUR (push) Successful in 8s
2026-04-03 08:54:39 +02:00
Uyanide 5db3650184 🐛 fix: remove unused config 'printPreview' 2026-04-03 08:52:56 +02:00
Uyanide 0524f26f97 🐛 fix: forgot to implement 'printSelected' 😒 2026-04-03 08:48:49 +02:00
Uyanide 740411f194 🐛 fix: correct behaviour of --disable-actions
Release / Build ArchLinux Package (push) Successful in 1m0s
Release / Publish to Gitea Release (push) Successful in 3s
Release / Publish to AUR (push) Successful in 9s
2026-03-24 12:48:01 +01:00
Uyanide 1a2daec165 🚀 CD: refactor release workflow 2026-03-24 11:42:41 +01:00
Uyanide 524b53b7b2 CD: rename workflow to Release 2026-03-24 11:23:10 +01:00
Uyanide b5ea96bb8b 🚀 CD: add MAKEFLAGS to optimize local build process 2026-03-24 11:14:08 +01:00
Uyanide 470bb1620a 🚀 CD: 😡
CI/CD / Package (push) Successful in 2m26s
CI/CD / Publish (push) Successful in 10s
2026-03-24 11:10:24 +01:00
Uyanide b1372cacd7 🚀 CD: change license to 0BSD
CI/CD / Package (push) Successful in 59s
CI/CD / Publish (push) Successful in 10s
2026-03-24 10:40:22 +01:00
Uyanide e59fba0689 🚀 CD
CI/CD / Package (push) Successful in 1m0s
CI/CD / Publish (push) Successful in 10s
2026-03-24 09:54:32 +01:00
14 changed files with 159 additions and 114 deletions
+43 -18
View File
@@ -1,4 +1,4 @@
name: CI/CD name: Release
on: on:
push: push:
@@ -6,8 +6,8 @@ on:
- 'v*' - 'v*'
jobs: jobs:
build: build-arch:
name: Package name: Build ArchLinux Package
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
@@ -33,13 +33,14 @@ jobs:
url="https://git.uyani.de/Uyanide/WallReel" url="https://git.uyani.de/Uyanide/WallReel"
license=('MIT') license=('MIT')
depends=('qt6-base' 'qt6-declarative' 'gcc-libs' 'glibc') depends=('qt6-base' 'qt6-declarative' 'gcc-libs' 'glibc')
makedepends=('cmake' 'ninja') makedepends=('cmake')
options=('!debug')
source=("${pkgname}-${pkgver}.tar.gz::https://git.uyani.de/Uyanide/WallReel/archive/v${pkgver}.tar.gz") source=("${pkgname}-${pkgver}.tar.gz::https://git.uyani.de/Uyanide/WallReel/archive/v${pkgver}.tar.gz")
sha256sums=('INSERT_SHA256_HERE') sha256sums=('INSERT_SHA256_HERE')
build() { build() {
cd "wallreel" cd "wallreel"
cmake -B build -S . -G Ninja \ cmake -B build -S . \
-DCMAKE_BUILD_TYPE='Release' \ -DCMAKE_BUILD_TYPE='Release' \
-DCMAKE_INSTALL_PREFIX='/usr' \ -DCMAKE_INSTALL_PREFIX='/usr' \
-Wno-dev -Wno-dev
@@ -64,40 +65,41 @@ jobs:
pacman-key --init && pacman-key --populate pacman-key --init && pacman-key --populate
pacman -Sy --noconfirm archlinux-keyring pacman -Sy --noconfirm archlinux-keyring
pacman -Su --noconfirm base-devel cmake ninja qt6-base qt6-declarative sudo pacman -Su --noconfirm base-devel cmake qt6-base qt6-declarative sudo
echo 'MAKEFLAGS="-j$(nproc)"' >> /etc/makepkg.conf
useradd -m builduser useradd -m builduser
chown -R builduser:builduser /workspace chown -R builduser:builduser /workspace
echo 'builduser ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers echo 'builduser ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
su - builduser -c 'cd /workspace && makepkg -sf --noconfirm' su - builduser -c 'cd /workspace && makepkg -sf --noconfirm'
su - builduser -c 'cd /workspace && makepkg --printsrcinfo > .SRCINFO' su - builduser -c 'cd /workspace && makepkg --printsrcinfo' > SRCINFO.txt
tar -cf - *.pkg.tar.zst PKGBUILD LICENSE .SRCINFO >&3 tar -cf - *.pkg.tar.zst PKGBUILD SRCINFO.txt >&3
" | tar -xf - " | tar -xf -
- name: Upload Artifacts - name: Upload Arch Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: release-artifacts name: arch-artifacts
path: | path: |
*.pkg.tar.zst *.pkg.tar.zst
PKGBUILD PKGBUILD
LICENSE SRCINFO.txt
.SRCINFO
release: publish-gitea:
name: Publish name: Publish to Gitea Release
needs: build needs: [build-arch]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Extract Version - name: Extract Version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Download Artifacts - name: Download Arch Artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: release-artifacts name: arch-artifacts
path: . path: .
- name: Publish to Gitea Release - name: Publish to Gitea Release
@@ -110,6 +112,20 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-aur:
name: Publish to AUR
needs: [build-arch]
runs-on: ubuntu-latest
steps:
- name: Extract Version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Download Arch Artifacts
uses: actions/download-artifact@v3
with:
name: arch-artifacts
path: .
- name: Publish to AUR - name: Publish to AUR
env: env:
AUR_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }} AUR_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
@@ -129,9 +145,18 @@ jobs:
git config --global user.email "me@uyani.de" git config --global user.email "me@uyani.de"
git clone ssh://aur@aur.archlinux.org/wallreel.git aur-repo git clone ssh://aur@aur.archlinux.org/wallreel.git aur-repo
cp PKGBUILD LICENSE .SRCINFO aur-repo/ cp PKGBUILD aur-repo/
cp SRCINFO.txt aur-repo/.SRCINFO
cd aur-repo cd aur-repo
cat << 'EOF' > LICENSE
Copyright (C) 2026 by Uyanide me@uyani.de
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
EOF
git add PKGBUILD LICENSE .SRCINFO git add PKGBUILD LICENSE .SRCINFO
git commit -m "Release v${{ env.VERSION }}" git commit -m "Release v${{ env.VERSION }}"
git push origin master git push origin master
+1 -1
View File
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
project(WallReel VERSION 2.0.0 LANGUAGES CXX) project(WallReel VERSION 2.1.0 LANGUAGES CXX)
set(EXECUTABLE_NAME "wallreel") set(EXECUTABLE_NAME "wallreel")
set(CORELIB_NAME "wallreel-core") set(CORELIB_NAME "wallreel-core")
-1
View File
@@ -117,7 +117,6 @@ Configures system commands to execute on specific events mapping to your window
| :-------------------- | :--------------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | :-------------------- | :--------------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `previewDebounceTime` | Integer | `300` | Debounce time (ms) for triggering the preview action. | | `previewDebounceTime` | Integer | `300` | Debounce time (ms) for triggering the preview action. |
| `printSelected` | Boolean | `true` | Print selected wallpaper path to stdout on confirm. | | `printSelected` | Boolean | `true` | Print selected wallpaper path to stdout on confirm. |
| `printPreview` | Boolean | `false` | Print previewed wallpaper path to stdout on preview. |
| `onSelected` | String | `""` | Command to execute when a wallpaper is confirmed. | | `onSelected` | String | `""` | Command to execute when a wallpaper is confirmed. |
| `onPreview` | String | `""` | Command to execute when a wallpaper is previewed. | | `onPreview` | String | `""` | Command to execute when a wallpaper is previewed. |
| `saveState` | Array of Objects | `[]` | Commands to fetch system states before changing wallpapers. Each object defines: `key`, `fallback` (fallback value), `command` (stdout mapping), and `timeout` (ms). | | `saveState` | Array of Objects | `[]` | Commands to fetch system states before changing wallpapers. Each object defines: `key`, `fallback` (fallback value), `command` (stdout mapping), and `timeout` (ms). |
+10 -10
View File
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.5 .\" Automatically generated by Pandoc 3.9.0.2
.\" .\"
.TH "WALLREEL" "1" "2026\-03\-24" "WallReel 2.0.0" "User Commands" .TH "WALLREEL" "1" "2026\-03\-24" "WallReel 2.0.2" "User Commands"
.SH NAME .SH NAME
wallreel \- Choose and set desktop wallpapers with customizable themes wallreel \- Choose and set desktop wallpapers with customizable themes
and actions and actions
@@ -42,20 +42,20 @@ In this mode, the configuration is still parsed.
Action placeholders are resolved from the selected image and any Action placeholders are resolved from the selected image and any
captured state values. captured state values.
.SH BEHAVIOR NOTES .SH BEHAVIOR NOTES
.IP \[bu] 2 .IP \(bu 2
CLI options are generally optional; configuration is the preferred CLI options are generally optional; configuration is the preferred
customization path. customization path.
.IP \[bu] 2 .IP \(bu 2
Some options are mutually exclusive (for example \f[CR]\-\-verbose\f[R] Some options are mutually exclusive (for example \f[CR]\-\-verbose\f[R]
and \f[CR]\-\-quiet\f[R]). and \f[CR]\-\-quiet\f[R]).
.IP \[bu] 2 .IP \(bu 2
With \f[CR]\-\-apply\f[R], WallReel executes configured selection With \f[CR]\-\-apply\f[R], WallReel executes configured selection
actions without opening the UI. actions without opening the UI.
.SH FILES .SH FILES
\f[CR]\[ti]/.config/wallreel/config.json\f[R] : Default configuration \f[CR]\(ti/.config/wallreel/config.json\f[R] : Default configuration
file location. file location.
.PP .PP
\f[CR]\[ti]/.cache/wallreel/\f[R] : Runtime cache location. \f[CR]\(ti/.cache/wallreel/\f[R] : Runtime cache location.
.SH EXAMPLES .SH EXAMPLES
Run with default configuration: Run with default configuration:
.IP .IP
@@ -66,19 +66,19 @@ wallreel
Use a custom configuration file: Use a custom configuration file:
.IP .IP
.EX .EX
wallreel \-\-config\-file \[ti]/.config/wallreel/config.json wallreel \-\-config\-file \(ti/.config/wallreel/config.json
.EE .EE
.PP .PP
Append additional search directories: Append additional search directories:
.IP .IP
.EX .EX
wallreel \-\-append\-dir \[ti]/Pictures/Wallpapers \-\-append\-dir \[ti]/Art wallreel \-\-append\-dir \(ti/Pictures/Wallpapers \-\-append\-dir \(ti/Art
.EE .EE
.PP .PP
Apply a wallpaper and exit: Apply a wallpaper and exit:
.IP .IP
.EX .EX
wallreel \-\-apply \[ti]/Pictures/wallpaper.jpg wallreel \-\-apply \(ti/Pictures/wallpaper.jpg
.EE .EE
.SH EXIT STATUS .SH EXIT STATUS
Returns \f[CR]0\f[R] on success. Returns \f[CR]0\f[R] on success.
+60 -63
View File
@@ -1,22 +1,22 @@
.\" Automatically generated by Pandoc 3.5 .\" Automatically generated by Pandoc 3.9.0.2
.\" .\"
.TH "WALLREEL" "5" "2026\-03\-24" "WallReel 2.0.0" "File Formats Manual" .TH "WALLREEL" "5" "2026\-03\-24" "WallReel 2.0.2" "File Formats Manual"
.SH NAME .SH NAME
wallreel\-config \- configuration format for wallreel wallreel\-config \- configuration format for wallreel
.SH SYNOPSIS .SH SYNOPSIS
\f[CR]\[ti]/.config/wallreel/config.json\f[R] \f[CR]\(ti/.config/wallreel/config.json\f[R]
.SH DESCRIPTION .SH DESCRIPTION
WallReel reads configuration from a JSON document. WallReel reads configuration from a JSON document.
The root object is divided into five sections: The root object is divided into five sections:
.IP \[bu] 2 .IP \(bu 2
\f[CR]wallpaper\f[R] \f[CR]wallpaper\f[R]
.IP \[bu] 2 .IP \(bu 2
\f[CR]theme\f[R] \f[CR]theme\f[R]
.IP \[bu] 2 .IP \(bu 2
\f[CR]action\f[R] \f[CR]action\f[R]
.IP \[bu] 2 .IP \(bu 2
\f[CR]style\f[R] \f[CR]style\f[R]
.IP \[bu] 2 .IP \(bu 2
\f[CR]cache\f[R] \f[CR]cache\f[R]
.PP .PP
For complete machine\-readable validation details, refer to For complete machine\-readable validation details, refer to
@@ -25,7 +25,7 @@ For complete machine\-readable validation details, refer to
Defines where WallReel looks for images and what to exclude. Defines where WallReel looks for images and what to exclude.
.PP .PP
If both \f[CR]paths\f[R] and \f[CR]dirs\f[R] are empty or omitted, If both \f[CR]paths\f[R] and \f[CR]dirs\f[R] are empty or omitted,
WallReel defaults to recursively scanning the user\[aq]s Pictures WallReel defaults to recursively scanning the user\(aqs Pictures
directory and treating all supported image files as wallpaper directory and treating all supported image files as wallpaper
candidates. candidates.
.PP .PP
@@ -36,9 +36,9 @@ to specific image files.
to scan for images. to scan for images.
.PP .PP
Each item has: Each item has:
.IP \[bu] 2 .IP \(bu 2
\f[CR]path\f[R] (string) \f[CR]path\f[R] (string)
.IP \[bu] 2 .IP \(bu 2
\f[CR]recursive\f[R] (boolean) \f[CR]recursive\f[R] (boolean)
.PP .PP
\f[CR]excludes\f[R] (array of string, default: \f[CR][]\f[R]) : Exclude \f[CR]excludes\f[R] (array of string, default: \f[CR][]\f[R]) : Exclude
@@ -54,16 +54,16 @@ the primary color.
palette definitions. palette definitions.
.PP .PP
Each palette has: Each palette has:
.IP \[bu] 2 .IP \(bu 2
\f[CR]name\f[R] (string) \f[CR]name\f[R] (string)
.IP \[bu] 2 .IP \(bu 2
\f[CR]colors\f[R] (array) \f[CR]colors\f[R] (array)
.PP .PP
Each color item has: Each color item has:
.IP \[bu] 2 .IP \(bu 2
\f[CR]name\f[R] (string) \f[CR]name\f[R] (string)
.IP \[bu] 2 .IP \(bu 2
\f[CR]value\f[R] (hex string, for example \f[CR]\[dq]#89b4fa\[dq]\f[R]) \f[CR]value\f[R] (hex string, for example \f[CR]\(dq#89b4fa\(dq\f[R])
.SH ACTION SECTION .SH ACTION SECTION
Configures commands executed for preview, selection, and restore Configures commands executed for preview, selection, and restore
behavior. behavior.
@@ -74,29 +74,26 @@ Debounce interval in milliseconds for preview actions.
\f[CR]printSelected\f[R] (boolean, default: \f[CR]true\f[R]) : Print \f[CR]printSelected\f[R] (boolean, default: \f[CR]true\f[R]) : Print
selected wallpaper path to stdout on confirmation. selected wallpaper path to stdout on confirmation.
.PP .PP
\f[CR]printPreview\f[R] (boolean, default: \f[CR]false\f[R]) : Print \f[CR]onSelected\f[R] (string, default: \f[CR]\(dq\(dq\f[R]) : Command
previewed wallpaper path to stdout on preview.
.PP
\f[CR]onSelected\f[R] (string, default: \f[CR]\[dq]\[dq]\f[R]) : Command
executed when a wallpaper is confirmed. executed when a wallpaper is confirmed.
.PP .PP
\f[CR]onPreview\f[R] (string, default: \f[CR]\[dq]\[dq]\f[R]) : Command \f[CR]onPreview\f[R] (string, default: \f[CR]\(dq\(dq\f[R]) : Command
executed when a wallpaper is previewed. executed when a wallpaper is previewed.
.PP .PP
\f[CR]saveState\f[R] (array of object, default: \f[CR][]\f[R]) : \f[CR]saveState\f[R] (array of object, default: \f[CR][]\f[R]) :
Commands for capturing system values before changing wallpaper. Commands for capturing system values before changing wallpaper.
.PP .PP
Each item has: Each item has:
.IP \[bu] 2 .IP \(bu 2
\f[CR]key\f[R] (placeholder key) \f[CR]key\f[R] (placeholder key)
.IP \[bu] 2 .IP \(bu 2
\f[CR]fallback\f[R] (default value) \f[CR]fallback\f[R] (default value)
.IP \[bu] 2 .IP \(bu 2
\f[CR]command\f[R] (stdout\-mapped command) \f[CR]command\f[R] (stdout\-mapped command)
.IP \[bu] 2 .IP \(bu 2
\f[CR]timeout\f[R] (milliseconds) \f[CR]timeout\f[R] (milliseconds)
.PP .PP
\f[CR]onRestore\f[R] (string, default: \f[CR]\[dq]\[dq]\f[R]) : Command \f[CR]onRestore\f[R] (string, default: \f[CR]\(dq\(dq\f[R]) : Command
executed on restore. executed on restore.
Saved state keys are usable as placeholders. Saved state keys are usable as placeholders.
.PP .PP
@@ -117,13 +114,13 @@ The following placeholders are available in \f[CR]onSelected\f[R],
wallpaper. wallpaper.
.PP .PP
\f[CR]{{ palette }}\f[R] : Selected palette name \f[CR]{{ palette }}\f[R] : Selected palette name
(\f[CR]\[dq]null\[dq]\f[R] if none). (\f[CR]\(dqnull\(dq\f[R] if none).
.PP .PP
\f[CR]{{ colorName }}\f[R] : Chosen primary color name \f[CR]{{ colorName }}\f[R] : Chosen primary color name
(\f[CR]\[dq]null\[dq]\f[R] if none). (\f[CR]\(dqnull\(dq\f[R] if none).
.PP .PP
\f[CR]{{ colorHex }}\f[R] : Chosen primary color hex \f[CR]{{ colorHex }}\f[R] : Chosen primary color hex
(\f[CR]\[dq]null\[dq]\f[R] if none). (\f[CR]\(dqnull\(dq\f[R] if none).
.PP .PP
\f[CR]{{ domColorHex }}\f[R] : Dominant color hex extracted from the \f[CR]{{ domColorHex }}\f[R] : Dominant color hex extracted from the
wallpaper. wallpaper.
@@ -162,54 +159,54 @@ Older entries are evicted.
.IP .IP
.EX .EX
{ {
\[dq]$schema\[dq]: \[dq]https://raw.githubusercontent.com/Uyanide/WallReel/refs/heads/master/config.schema.json\[dq], \(dq$schema\(dq: \(dqhttps://raw.githubusercontent.com/Uyanide/WallReel/refs/heads/master/config.schema.json\(dq,
\[dq]wallpaper\[dq]: { \(dqwallpaper\(dq: {
\[dq]paths\[dq]: [\[dq]/home/user/Pictures/favorite.jpg\[dq]], \(dqpaths\(dq: [\(dq/home/user/Pictures/favorite.jpg\(dq],
\[dq]dirs\[dq]: [ \(dqdirs\(dq: [
{ {
\[dq]path\[dq]: \[dq]/home/user/Pictures/Wallpapers\[dq], \(dqpath\(dq: \(dq/home/user/Pictures/Wallpapers\(dq,
\[dq]recursive\[dq]: \f[B]true\f[R] \(dqrecursive\(dq: \f[B]true\f[R]
} }
], ],
\[dq]excludes\[dq]: [\[dq]\[rs]\[rs].gif$\[dq]] \(dqexcludes\(dq: [\(dq\(rs\(rs.gif$\(dq]
}, },
\[dq]theme\[dq]: { \(dqtheme\(dq: {
\[dq]palettes\[dq]: [ \(dqpalettes\(dq: [
{ {
\[dq]name\[dq]: \[dq]Dark\[dq], \(dqname\(dq: \(dqDark\(dq,
\[dq]colors\[dq]: [ \(dqcolors\(dq: [
{ \[dq]name\[dq]: \[dq]blue\[dq], \[dq]value\[dq]: \[dq]#89b4fa\[dq] }, { \(dqname\(dq: \(dqblue\(dq, \(dqvalue\(dq: \(dq#89b4fa\(dq },
{ \[dq]name\[dq]: \[dq]red\[dq], \[dq]value\[dq]: \[dq]#f38ba8\[dq] } { \(dqname\(dq: \(dqred\(dq, \(dqvalue\(dq: \(dq#f38ba8\(dq }
] ]
} }
] ]
}, },
\[dq]action\[dq]: { \(dqaction\(dq: {
\[dq]previewDebounceTime\[dq]: 500, \(dqpreviewDebounceTime\(dq: 500,
\[dq]quitOnSelected\[dq]: \f[B]true\f[R], \(dqquitOnSelected\(dq: \f[B]true\f[R],
\[dq]onPreview\[dq]: \[dq]swww img {{ path }}\[dq], \(dqonPreview\(dq: \(dqswww img {{ path }}\(dq,
\[dq]onSelected\[dq]: \[dq]cp {{ path }} \[ti]/.config/wallpaper/current/ && swww img {{ path }}\[dq], \(dqonSelected\(dq: \(dqcp {{ path }} \(ti/.config/wallpaper/current/ && swww img {{ path }}\(dq,
\[dq]saveState\[dq]: [ \(dqsaveState\(dq: [
{ {
\[dq]key\[dq]: \[dq]current_wp\[dq], \(dqkey\(dq: \(dqcurrent_wp\(dq,
\[dq]fallback\[dq]: \[dq]/home/user/Pictures/default.jpg\[dq], \(dqfallback\(dq: \(dq/home/user/Pictures/default.jpg\(dq,
\[dq]command\[dq]: \[dq]find \[ti]/.config/wallpaper/current \-type f | head \-n 1\[dq], \(dqcommand\(dq: \(dqfind \(ti/.config/wallpaper/current \-type f | head \-n 1\(dq,
\[dq]timeout\[dq]: 1000 \(dqtimeout\(dq: 1000
} }
], ],
\[dq]onRestore\[dq]: \[dq]swww img {{ current_wp }}\[dq] \(dqonRestore\(dq: \(dqswww img {{ current_wp }}\(dq
}, },
\[dq]style\[dq]: { \(dqstyle\(dq: {
\[dq]image_width\[dq]: 640, \(dqimage_width\(dq: 640,
\[dq]image_height\[dq]: 400, \(dqimage_height\(dq: 400,
\[dq]image_focus_scale\[dq]: 1.2, \(dqimage_focus_scale\(dq: 1.2,
\[dq]window_width\[dq]: 1280, \(dqwindow_width\(dq: 1280,
\[dq]window_height\[dq]: 720 \(dqwindow_height\(dq: 720
}, },
\[dq]cache\[dq]: { \(dqcache\(dq: {
\[dq]saveSortMethod\[dq]: \f[B]true\f[R], \(dqsaveSortMethod\(dq: \f[B]true\f[R],
\[dq]savePalette\[dq]: \f[B]true\f[R], \(dqsavePalette\(dq: \f[B]true\f[R],
\[dq]maxImageEntries\[dq]: 300 \(dqmaxImageEntries\(dq: 300
} }
} }
.EE .EE
-2
View File
@@ -27,7 +27,6 @@
// //
// action.previewDebounceTime number 300 Debounce time for preview action in milliseconds // action.previewDebounceTime number 300 Debounce time for preview action in milliseconds
// action.printSelected boolean true Whether to print the selected wallpaper path to stdout on confirm // action.printSelected boolean true Whether to print the selected wallpaper path to stdout on confirm
// action.printPreview boolean false Whether to print the previewed wallpaper path to stdout on preview
// action.onSelected string "" Command to execute on confirmation // action.onSelected string "" Command to execute on confirmation
// action.onPreview string "" Command to execute on preview // action.onPreview string "" Command to execute on preview
// action.saveState array [] Useful for restore command // action.saveState array [] Useful for restore command
@@ -126,7 +125,6 @@ struct ActionConfigItems {
QString onRestore; QString onRestore;
int previewDebounceTime = 300; // milliseconds int previewDebounceTime = 300; // milliseconds
bool printSelected = true; bool printSelected = true;
bool printPreview = false;
bool quitOnSelected = false; bool quitOnSelected = false;
bool restoreOnClose = true; bool restoreOnClose = true;
}; };
+9 -7
View File
@@ -26,8 +26,9 @@ Manager::Manager(
const QDir& picturesDir, const QDir& picturesDir,
const QStringList& searchDirs, const QStringList& searchDirs,
const QString& configPath, const QString& configPath,
bool disableActions,
QObject* parent) QObject* parent)
: QObject(parent), m_configDir(configDir) { : QObject(parent), m_configDir(configDir), m_disableActions(disableActions) {
connect(this, &Manager::stateCaptured, this, [this]() { connect(this, &Manager::stateCaptured, this, [this]() {
m_stateCaptured = true; m_stateCaptured = true;
WR_INFO("State capture completed"); WR_INFO("State capture completed");
@@ -202,12 +203,6 @@ void Manager::_loadActionConfig(const QJsonObject& root) {
m_actionConfig.printSelected = val.toBool(); m_actionConfig.printSelected = val.toBool();
} }
} }
if (config.contains("printPreview")) {
const auto& val = config["printPreview"];
if (val.isBool()) {
m_actionConfig.printPreview = val.toBool();
}
}
if (config.contains("saveState") && config["saveState"].isArray()) { if (config.contains("saveState") && config["saveState"].isArray()) {
const QJsonArray& arr = config["saveState"].toArray(); const QJsonArray& arr = config["saveState"].toArray();
for (const auto& item : arr) { for (const auto& item : arr) {
@@ -398,6 +393,13 @@ void Manager::captureState() {
if (m_stateCaptured) { if (m_stateCaptured) {
WR_DEBUG("State already captured, skipping capture"); WR_DEBUG("State already captured, skipping capture");
emit stateCaptured(); emit stateCaptured();
return;
}
if (m_disableActions) {
WR_DEBUG("Actions are disabled, skipping state capture");
emit stateCaptured();
return;
} }
if (m_pendingCaptures > 0) { if (m_pendingCaptures > 0) {
+4
View File
@@ -27,6 +27,7 @@ class Manager : public QObject {
* @param searchDirs Additional directories to search for wallpapers (not recursive) * @param searchDirs Additional directories to search for wallpapers (not recursive)
* @param configPath Optional path to a specific configuration file (overrides the default config path) * @param configPath Optional path to a specific configuration file (overrides the default config path)
* @param picturesDir The pictures directory (default location for user wallpapers) * @param picturesDir The pictures directory (default location for user wallpapers)
* @param disableActions Whether to disable actions
* @param parent QObject parent * @param parent QObject parent
* *
* @note The constructor will load the configuration and scan for wallpapers immediately. * @note The constructor will load the configuration and scan for wallpapers immediately.
@@ -36,6 +37,7 @@ class Manager : public QObject {
const QDir& picturesDir, const QDir& picturesDir,
const QStringList& searchDirs = {}, const QStringList& searchDirs = {},
const QString& configPath = "", const QString& configPath = "",
bool disableActions = false,
QObject* parent = nullptr); QObject* parent = nullptr);
~Manager(); ~Manager();
@@ -88,6 +90,8 @@ class Manager : public QObject {
private: private:
const QDir m_configDir; const QDir m_configDir;
bool m_disableActions = false;
WallpaperConfigItems m_wallpaperConfig; WallpaperConfigItems m_wallpaperConfig;
ThemeConfigItems m_themeConfig; ThemeConfigItems m_themeConfig;
ActionConfigItems m_actionConfig; ActionConfigItems m_actionConfig;
+9 -2
View File
@@ -18,12 +18,13 @@ class Bootstrap {
friend class Carousel; friend class Carousel;
public: public:
Bootstrap(const AppOptions& options) { Bootstrap(const AppOptions& options) : options(options) {
configMgr = new Config::Manager( configMgr = new Config::Manager(
Utils::getConfigDir(), Utils::getConfigDir(),
Utils::getPicturesDir(), Utils::getPicturesDir(),
options.appendDirs, options.appendDirs,
options.configPath); options.configPath,
options.disableActions);
cacheMgr = new Cache::Manager( cacheMgr = new Cache::Manager(
Utils::getCacheDir(), Utils::getCacheDir(),
@@ -58,6 +59,11 @@ class Bootstrap {
} }
bool apply(const QString& path) { bool apply(const QString& path) {
if (options.disableActions) {
Logger::warn("Bootstrap", "Actions are disabled, cannot apply wallpaper");
return false;
}
QEventLoop loop; QEventLoop loop;
bool successFlag = false; bool successFlag = false;
@@ -122,6 +128,7 @@ class Bootstrap {
} }
private: private:
const AppOptions& options;
Cache::Manager* cacheMgr{}; Cache::Manager* cacheMgr{};
Config::Manager* configMgr{}; Config::Manager* configMgr{};
Image::Manager* imageMgr{}; Image::Manager* imageMgr{};
+3
View File
@@ -1,5 +1,6 @@
#include "manager.hpp" #include "manager.hpp"
#include "Utils/misc.hpp"
#include "Utils/texttemplate.hpp" #include "Utils/texttemplate.hpp"
#include "logger.hpp" #include "logger.hpp"
@@ -61,6 +62,8 @@ void Manager::selectWallpaper(const QString& id) {
return; return;
} }
Utils::printPath(data->getFullPath());
const auto command = _renderCommand(m_actionConfig.onSelected, _generateVariables(*data)); const auto command = _renderCommand(m_actionConfig.onSelected, _generateVariables(*data));
m_wallpaperService->select(command); m_wallpaperService->select(command);
} }
+18
View File
@@ -179,6 +179,24 @@ inline QDir getPicturesDir() {
return QDir(picturesDir); return QDir(picturesDir);
} }
inline void printPath(const QString& path, std::FILE* out = stdout) {
if (path.isEmpty()) {
return;
}
const QByteArray bytes = QFile::encodeName(path);
const size_t n = static_cast<size_t>(bytes.size());
if (std::fwrite(bytes.constData(), 1, n, out) != n) {
return;
}
if (std::fputc('\n', out) == EOF) {
return;
}
std::fflush(out);
return;
}
} // namespace WallReel::Core::Utils } // namespace WallReel::Core::Utils
#endif // WALLREEL_MISC_HPP #endif // WALLREEL_MISC_HPP
-5
View File
@@ -96,11 +96,6 @@
"default": true, "default": true,
"description": "Whether to print the selected wallpaper path to stdout on confirm" "description": "Whether to print the selected wallpaper path to stdout on confirm"
}, },
"printPreview": {
"type": "boolean",
"default": false,
"description": "Whether to print the previewed wallpaper path to stdout on preview"
},
"onSelected": { "onSelected": {
"type": "string", "type": "string",
"default": "", "default": "",
+1 -1
View File
@@ -2,7 +2,7 @@
title: WALLREEL title: WALLREEL
section: 1 section: 1
header: User Commands header: User Commands
footer: WallReel 2.0.0 footer: WallReel 2.0.2
date: 2026-03-24 date: 2026-03-24
--- ---
+1 -4
View File
@@ -2,7 +2,7 @@
title: WALLREEL title: WALLREEL
section: 5 section: 5
header: File Formats Manual header: File Formats Manual
footer: WallReel 2.0.0 footer: WallReel 2.0.2
date: 2026-03-24 date: 2026-03-24
--- ---
@@ -79,9 +79,6 @@ Configures commands executed for preview, selection, and restore behavior.
`printSelected` (boolean, default: `true`) `printSelected` (boolean, default: `true`)
: Print selected wallpaper path to stdout on confirmation. : Print selected wallpaper path to stdout on confirmation.
`printPreview` (boolean, default: `false`)
: Print previewed wallpaper path to stdout on preview.
`onSelected` (string, default: `""`) `onSelected` (string, default: `""`)
: Command executed when a wallpaper is confirmed. : Command executed when a wallpaper is confirmed.