diff --git a/README.md b/README.md index 93186ff..b3b1f4d 100644 --- a/README.md +++ b/README.md @@ -67,8 +67,21 @@ Then `chezmoi apply`. - 6 Lua `hl.monitor(...)` rules (3 home + 3 office) — desc-keyed so the right machine picks the right monitors automatically. - Cursor: Catppuccin Mocha Teal (Hyprcursor) with Catppuccin Mocha Green as XCursor fallback. - Electron / fcitx5 / GTK theming env vars set centrally. -- Noctalia v5 owns the desktop shell layer (bar, launcher, notifications, wallpaper, lock screen, idle, screenshots, clipboard). -- Wallpapers are deployed by chezmoi to `~/.config/wallpapers`; Noctalia reads that path directly. +- Noctalia v5 owns the desktop shell layer (bar, launcher, notifications, wallpaper by default, lock screen, idle, screenshots, clipboard). +- Wallpapers are deployed by chezmoi to `~/.config/wallpapers`; Noctalia reads that path directly unless Wallpaper Engine is enabled. +- Wallpaper Engine is opt-in through `data.wallpaperEngine.arguments`; when configured, Hyprland starts `linux-wallpaperengine-start` and Noctalia's static wallpaper layer is disabled. + +### Wallpaper Engine (Hyprland) + +Arch/CachyOS installs `linux-wallpaperengine-git` via `paru`; other Linux machines need a `linux-wallpaperengine` binary on `PATH`. Install and own the official Steam Wallpaper Engine assets first. Upstream auto-detects the usual Steam library paths, then `arguments` are passed directly to `linux-wallpaperengine` at Hyprland startup: + +```toml +[data.wallpaperEngine] +enabled = true +arguments = ["--silent", "--fps", "30", "--scaling", "fill", "1845706469"] +``` + +Use the same argument list shape for multi-monitor commands, for example `--screen-root ... --bg ...` from upstream's README. ## Keymappings @@ -164,6 +177,7 @@ Then `chezmoi apply`. - [`hyprland`](https://hyprland.org) — Wayland compositor. - [`noctalia`](https://github.com/noctalia-dev/noctalia) — desktop shell: bar, launcher, notifications, wallpaper, lock screen, idle behavior, screenshots, clipboard, and control center. +- [`linux-wallpaperengine`](https://github.com/Almamu/linux-wallpaperengine) — opt-in live wallpapers from Steam Wallpaper Engine assets on Hyprland. - [`sddm`](https://github.com/sddm/sddm) — bootstrap and fallback display manager for fresh Arch installs. - [`greetd`](https://git.sr.ht/~kennylevinsen/greetd) + [`Noctalia Greeter`](https://github.com/noctalia-dev/noctalia-greeter) — final Wayland login greeter after AUR packages are installed. - [`fcitx5`](https://github.com/fcitx/fcitx5) + chewing — Chinese input. @@ -224,10 +238,11 @@ Then `chezmoi apply`. ## Layout ``` -home/ # chezmoi source root (.chezmoiroot=home) -├── .chezmoidata/packages.yaml # canonical package list (pacman + apt) -├── .chezmoiexternal.toml.tmpl # auto-pulled theme files -├── .chezmoiscripts/ # run_once / run_onchange bootstrap -├── .chezmoitemplates/ # macOS install template (Brewfile pass-thru) -└── dot_config/ # → ~/.config/... +home/ # chezmoi source root (.chezmoiroot=home) +├── .chezmoidata/ # package list + feature defaults +├── .chezmoiexternal.toml.tmpl # auto-pulled theme files +├── .chezmoiscripts/ # run_once / run_onchange bootstrap +├── .chezmoitemplates/ # macOS install template (Brewfile pass-thru) +├── dot_config/ # → ~/.config/... +└── dot_local/ # → ~/.local/... ``` diff --git a/home/.chezmoidata/packages.yaml b/home/.chezmoidata/packages.yaml index 3c093b4..fc7255f 100644 --- a/home/.chezmoidata/packages.yaml +++ b/home/.chezmoidata/packages.yaml @@ -37,6 +37,7 @@ packages: - libnewt - libreoffice-fresh - linux-headers + - linux-wallpaperengine-git - localsend-bin - mission-center - mattermost-desktop diff --git a/home/.chezmoidata/wallpaper-engine.yaml b/home/.chezmoidata/wallpaper-engine.yaml new file mode 100644 index 0000000..9420cf0 --- /dev/null +++ b/home/.chezmoidata/wallpaper-engine.yaml @@ -0,0 +1,3 @@ +wallpaperEngine: + enabled: false + arguments: [] diff --git a/home/.chezmoiignore b/home/.chezmoiignore index 3de645d..00a987d 100644 --- a/home/.chezmoiignore +++ b/home/.chezmoiignore @@ -29,6 +29,7 @@ Library/** .config/paru/** .local/share/applications .local/share/applications/** +.local/bin/linux-wallpaperengine-start {{- else if not (or (eq .chezmoi.osRelease.id "arch") (eq .chezmoi.osRelease.id "cachyos")) }} .config/paru .config/paru/** diff --git a/home/.chezmoiscripts/run_onchange_after_0-install-packages.sh.tmpl b/home/.chezmoiscripts/run_onchange_after_0-install-packages.sh.tmpl index 1cfb615..0eed8ff 100644 --- a/home/.chezmoiscripts/run_onchange_after_0-install-packages.sh.tmpl +++ b/home/.chezmoiscripts/run_onchange_after_0-install-packages.sh.tmpl @@ -34,7 +34,25 @@ retry() { {{ if .packages.sharedArch.pacman }} # Use -Syu to ensure system is up-to-date and libalpm version matches paru sudo pacman -Syu --noconfirm - retry paru -S --needed --noconfirm {{ range .packages.sharedArch.pacman }}{{ . }} {{ end }} + arch_packages=( + {{- range .packages.sharedArch.pacman }} + {{ . | quote }} + {{- end }} + ) + if [[ "${GITHUB_ACTIONS:-}" == "true" ]]; then + filtered_packages=() + for package in "${arch_packages[@]}"; do + case "$package" in + linux-wallpaperengine-git) + echo -e "${GREEN}Skipping linux-wallpaperengine-git in CI (large AUR source build)${NC}" + continue + ;; + esac + filtered_packages+=("$package") + done + arch_packages=("${filtered_packages[@]}") + fi + retry paru -S --needed --noconfirm "${arch_packages[@]}" {{ end }} {{ if eq $osid "cachyos" }} @@ -82,4 +100,3 @@ retry() { {{ end }} echo -e "${GREEN}Package installation complete!${NC}" - diff --git a/home/dot_config/hypr/hyprland.lua.tmpl b/home/dot_config/hypr/hyprland.lua.tmpl index b1d1df8..a5f232f 100644 --- a/home/dot_config/hypr/hyprland.lua.tmpl +++ b/home/dot_config/hypr/hyprland.lua.tmpl @@ -89,6 +89,7 @@ hl.on("hyprland.start", function() ) hl.exec_cmd("blueman-applet") hl.exec_cmd("fcitx5 -d") + hl.exec_cmd({{ printf "%s/.local/bin/linux-wallpaperengine-start" .chezmoi.homeDir | quote }}) hl.exec_cmd("noctalia") end) diff --git a/home/dot_config/noctalia/config.toml b/home/dot_config/noctalia/config.toml.tmpl similarity index 93% rename from home/dot_config/noctalia/config.toml rename to home/dot_config/noctalia/config.toml.tmpl index aad980d..72d703a 100644 --- a/home/dot_config/noctalia/config.toml +++ b/home/dot_config/noctalia/config.toml.tmpl @@ -20,7 +20,8 @@ freeze_screen = false pipe_to_command = false [wallpaper] -enabled = true +# linux-wallpaperengine draws its own background layer when configured. +enabled = {{ if and .wallpaperEngine.enabled (gt (len .wallpaperEngine.arguments) 0) }}false{{ else }}true{{ end }} fill_mode = "crop" directory = "~/.config/wallpapers" transition_on_startup = false diff --git a/home/dot_local/bin/executable_linux-wallpaperengine-start.tmpl b/home/dot_local/bin/executable_linux-wallpaperengine-start.tmpl new file mode 100644 index 0000000..d196b32 --- /dev/null +++ b/home/dot_local/bin/executable_linux-wallpaperengine-start.tmpl @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail + +enabled="{{ .wallpaperEngine.enabled }}" +args=( +{{- range .wallpaperEngine.arguments }} + {{ . | quote }} +{{- end }} +) + +if [[ "$enabled" != "true" || ${#args[@]} -eq 0 ]]; then + exit 0 +fi + +if ! command -v linux-wallpaperengine >/dev/null 2>&1; then + echo "linux-wallpaperengine is not installed; run chezmoi apply after package installation." >&2 + exit 0 +fi + +exec linux-wallpaperengine "${args[@]}"