Compare commits

...

13 commits
v0.1.0 ... main

Author SHA1 Message Date
Breadway
1671af82ee fix: rustfmt violations
Some checks failed
Mirror to GitHub / mirror (push) Failing after 2s
2026-06-19 08:38:41 +08:00
Breadway
1b4f9c5c04 fix(ci): clone bread-ecosystem to /tmp to avoid stale permissions
Some checks failed
Mirror to GitHub / mirror (push) Failing after 2s
release / build (push) Successful in 18s
Build and publish package / package (push) Failing after 1m7s
2026-06-17 22:53:08 +08:00
Breadway
5c9efcf316 fix: correct awww subcommand to img, support bare path arg, add --version
Some checks failed
Mirror to GitHub / mirror (push) Failing after 3s
release / build (push) Failing after 10s
Build and publish package / package (push) Failing after 1m19s
2026-06-17 22:44:48 +08:00
Breadway
b064e86f2f fix(ci): clone to /tmp to avoid stale work-dir permissions, use hestia label
Some checks failed
Mirror to GitHub / mirror (push) Failing after 2s
release / build (push) Failing after 7s
Build and publish package / package (push) Failing after 1m18s
2026-06-17 19:09:15 +08:00
Breadway
014fd9c12e fix(ci): add cargo to PATH for host runner
Some checks failed
Mirror to GitHub / mirror (push) Failing after 2s
release / build (push) Failing after 13s
Build and publish package / package (push) Failing after 2m1s
2026-06-17 18:54:32 +08:00
Breadway
2d0cdae396 fix(ci): run release job on hestia host to access cargo and dl server
Some checks failed
Mirror to GitHub / mirror (push) Failing after 1s
release / build (push) Failing after 1s
Build and publish package / package (push) Failing after 1m52s
hestia-host maps to host execution on the Forgejo runner, giving access
to /home/breadway/.cargo/bin/cargo and /srv/breadway-dl without Docker.
2026-06-17 14:54:59 +08:00
Breadway
ca843bf255 fix(ci): replace actions/checkout with manual git clone in release
Some checks failed
Mirror to GitHub / mirror (push) Failing after 3s
Build and publish package / package (push) Failing after 2m1s
release / build (push) Failing after 1s
actions/checkout uses GITHUB_SERVER_URL=http://localhost:3002 which is
unreachable from inside the Docker container. Use the public Forgejo URL
directly, matching the pattern used by package.yml.
2026-06-17 14:49:06 +08:00
Breadway
4bb2fd43ca fix: move release workflow to Forgejo, add LICENSE
Some checks failed
Mirror to GitHub / mirror (push) Failing after 3s
Build and publish package / package (push) Failing after 1m53s
release / build (push) Failing after 5s
release.yml moves from .github/ to .forgejo/ so it runs directly on
the hestia runner without needing the GitHub mirror. GitHub upload step
dropped; bakery uses dl.breadway.dev as primary. LICENSE added to fix
PKGBUILD package() failure.
2026-06-17 14:45:56 +08:00
Breadway
19e660937f debug: GIT_CURL_VERBOSE trace 2026-06-17 14:40:22 +08:00
Breadway
2d0d9728b2 debug: inspect workspace git config 2026-06-17 14:39:30 +08:00
Breadway
4aad0afeac debug: add git env and system config inspection 2026-06-17 14:38:34 +08:00
Breadway
8e1f0babb8 debug: print git config and env in mirror step 2026-06-17 14:35:41 +08:00
Breadway
580a51c350 fix(pkg): move python-pywal to optdepends in PKGBUILD
Some checks failed
Mirror to GitHub / mirror (push) Failing after 3s
Build and publish package / package (push) Failing after 2m52s
python-pywal is AUR-only; makepkg cannot resolve it as a hard depends.
2026-06-17 14:16:44 +08:00
6 changed files with 93 additions and 73 deletions

View file

@ -0,0 +1,53 @@
name: release
on:
push:
tags: ["v*"]
env:
DL_DIR: /srv/breadway-dl
ECOSYSTEM_DIR: /tmp/bread-ecosystem-ci
PATH: /home/breadway/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
jobs:
build:
runs-on: hestia
defaults:
run:
working-directory: /tmp/breadpaper-build
steps:
- name: checkout
working-directory: /tmp
run: |
rm -rf /tmp/breadpaper-build
git clone --branch "${GITHUB_REF_NAME}" --depth 1 \
"https://git.breadway.dev/${GITHUB_REPOSITORY}.git" /tmp/breadpaper-build
- name: build
run: /home/breadway/.cargo/bin/cargo build --release --locked
- name: test
run: /home/breadway/.cargo/bin/cargo test --release --locked
- name: prepare artifacts
run: |
VERSION="${GITHUB_REF_NAME#v}"
PKG_DIR="${DL_DIR}/breadpaper/${VERSION}"
mkdir -p "${PKG_DIR}"
cp target/release/breadpaper "${PKG_DIR}/breadpaper-x86_64"
strip "${PKG_DIR}/breadpaper-x86_64"
sha256sum "${PKG_DIR}/breadpaper-x86_64" | awk '{print $1}' \
> "${PKG_DIR}/breadpaper-x86_64.sha256"
cp bakery.toml "${PKG_DIR}/bakery.toml"
ln -sfn "${VERSION}" "${DL_DIR}/breadpaper/latest"
- name: ensure bread-ecosystem
working-directory: /tmp
run: |
rm -rf "${ECOSYSTEM_DIR}"
git clone https://github.com/Breadway/bread-ecosystem.git "${ECOSYSTEM_DIR}"
- name: regenerate index.json
working-directory: /tmp
run: bash "${ECOSYSTEM_DIR}/scripts/gen-index.sh"

View file

@ -1,61 +0,0 @@
name: release
on:
push:
tags: ["v*"]
permissions:
contents: write
env:
DL_DIR: /srv/breadway-dl
ECOSYSTEM_DIR: /home/breadway/Projects/bread-ecosystem
jobs:
build:
runs-on: [self-hosted, hestia]
steps:
- uses: actions/checkout@v4
- name: build
run: cargo build --release --locked
- name: test
run: cargo test --release --locked
- name: prepare artifacts
run: |
VERSION="${GITHUB_REF_NAME#v}"
PKG_DIR="${DL_DIR}/breadpaper/${VERSION}"
mkdir -p "${PKG_DIR}"
cp target/release/breadpaper "${PKG_DIR}/breadpaper-x86_64"
strip "${PKG_DIR}/breadpaper-x86_64"
sha256sum "${PKG_DIR}/breadpaper-x86_64" | awk '{print $1}' \
> "${PKG_DIR}/breadpaper-x86_64.sha256"
cp bakery.toml "${PKG_DIR}/bakery.toml"
ln -sfn "${VERSION}" "${DL_DIR}/breadpaper/latest"
- name: ensure bread-ecosystem
run: |
if [[ -d "${ECOSYSTEM_DIR}/.git" ]]; then
git -C "${ECOSYSTEM_DIR}" pull --ff-only
else
mkdir -p "$(dirname "${ECOSYSTEM_DIR}")"
git clone https://github.com/Breadway/bread-ecosystem.git "${ECOSYSTEM_DIR}"
fi
- name: regenerate index.json
run: bash "${ECOSYSTEM_DIR}/scripts/gen-index.sh"
- name: upload to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
PKG_DIR="${DL_DIR}/breadpaper/${VERSION}"
gh release create "${GITHUB_REF_NAME}" \
--title "breadpaper v${VERSION}" --generate-notes 2>/dev/null || true
gh release upload "${GITHUB_REF_NAME}" \
"${PKG_DIR}/breadpaper-x86_64" \
"${PKG_DIR}/breadpaper-x86_64.sha256" \
--clobber

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Breadway
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -8,8 +8,9 @@ arch=('x86_64')
url="https://github.com/Breadway/breadpaper"
license=('MIT')
options=(!lto !debug)
depends=('glibc' 'python-pywal')
depends=('glibc')
optdepends=(
'python-pywal: colour palette generation from wallpaper (AUR)'
'awww: Wayland wallpaper daemon'
)
makedepends=('rust' 'cargo')

View file

@ -4,19 +4,23 @@ use std::process;
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(name = "breadpaper", about = "Wallpaper manager for the bread desktop")]
#[command(
name = "breadpaper",
version,
about = "Wallpaper manager for the bread desktop"
)]
struct Cli {
/// Image file to set as wallpaper (shorthand for `set`)
path: Option<PathBuf>,
#[command(subcommand)]
command: Command,
command: Option<Command>,
}
#[derive(Subcommand)]
enum Command {
/// Set wallpaper, generate pywal palette, and reload bread themes
Set {
/// Path to the image file
path: PathBuf,
},
Set { path: PathBuf },
/// Print the current wallpaper path
Get,
}
@ -24,9 +28,11 @@ enum Command {
fn main() {
let cli = Cli::parse();
let result = match cli.command {
Command::Set { path } => breadpaper::set(&path),
Command::Get => breadpaper::get().map(|p| println!("{}", p.display())),
let result = match (cli.command, cli.path) {
(Some(Command::Set { path }), _) | (None, Some(path)) => breadpaper::set(&path),
(Some(Command::Get), _) | (None, None) => {
breadpaper::get().map(|p| println!("{}", p.display()))
}
};
if let Err(e) = result {

View file

@ -5,13 +5,13 @@ use anyhow::{Context, Result, bail};
pub fn apply(path: &Path) -> Result<()> {
let status = Command::new("awww")
.arg("set")
.arg("img")
.arg(path)
.status()
.context("failed to run awww — is awww-daemon running?")?;
if !status.success() {
bail!("awww set exited with {}", status);
bail!("awww img exited with {}", status);
}
Ok(())
}