diff --git a/README.md b/README.md index dbb27a81..61988fed 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,19 @@ chezmoi init --apply collieiscute -v - Noctalia is the Linux wallpaper/theme owner. App theme integrations should write generated theme files and reload apps, not mutate chezmoi-managed main config files. - Noctalia desktop/lockscreen widget placement is generated from monitor roles and ratios in `20-widgets.generated.toml.tmpl`; run `chezmoi apply` after changing the monitor layout. - If widgets are edited in Noctalia's GUI, remove `[desktop_widgets]` and `[lockscreen_widgets]` from `~/.local/state/noctalia/settings.toml` or fold the new ratios back into the template; state overrides win over declarative config. +- 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 @@ -186,6 +199,7 @@ AeroSpace restores the swapped root layouts and window states where possible; it - [`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. @@ -256,8 +270,10 @@ AeroSpace restores the swapped root layouts and window states where possible; it ``` home/ # chezmoi source root (.chezmoiroot=home) ├── .chezmoidata/packages.yaml # canonical package list (paru + apt) +├── .chezmoidata/ # feature defaults ├── .chezmoiexternal.toml # external theme files ├── .chezmoiscripts/ # run_once / run_onchange bootstrap ├── .chezmoitemplates/ # macOS install template (Brewfile pass-thru) -└── dot_config/ # → ~/.config/... +├── dot_config/ # → ~/.config/... +└── dot_local/ # → ~/.local/... ``` diff --git a/home/.chezmoidata/packages.yaml b/home/.chezmoidata/packages.yaml index 6f39b19b..3b7cee09 100644 --- a/home/.chezmoidata/packages.yaml +++ b/home/.chezmoidata/packages.yaml @@ -40,6 +40,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 00000000..9420cf09 --- /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 2365d837..823d6f41 100644 --- a/home/.chezmoiignore +++ b/home/.chezmoiignore @@ -28,7 +28,8 @@ Library/** .config/paru/** .local/share/applications .local/share/applications/** -{{- else if ne .chezmoi.osRelease.id "arch" }} +.local/bin/linux-wallpaperengine-start +{{- else if not (or (eq .chezmoi.osRelease.id "arch") (eq .chezmoi.osRelease.id "cachyos")) }} .config/paru .config/paru/** {{- end }} 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 d9f980a1..78ed8fde 100644 --- a/home/.chezmoiscripts/run_onchange_after_0-install-packages.sh.tmpl +++ b/home/.chezmoiscripts/run_onchange_after_0-install-packages.sh.tmpl @@ -10,14 +10,32 @@ NC='\033[0m' {{ else if eq .chezmoi.os "linux" }} {{- $osid := .chezmoi.osRelease.id -}} - {{ if eq $osid "arch" }} + {{ if or (eq $osid "arch") (eq $osid "cachyos") }} sudo rm -f /etc/lsb-release echo -e "${GREEN}Installing packages for {{ $osid }}...${NC}" {{ if .packages.arch.paru }} # Use -Syu to ensure system is up-to-date and libalpm version matches paru sudo pacman -Syu --noconfirm + arch_packages=( + {{- range .packages.arch.paru }} + {{ . | 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 for attempt in 1 2 3; do - paru -S --needed --noconfirm {{ range .packages.arch.paru }}{{ . }} {{ end }} && break + paru -S --needed --noconfirm "${arch_packages[@]}" && break (( attempt == 3 )) && exit 1 sleep 5 done diff --git a/home/dot_config/hypr/hyprland.lua.tmpl b/home/dot_config/hypr/hyprland.lua.tmpl index ff5d4a5f..d120b313 100644 --- a/home/dot_config/hypr/hyprland.lua.tmpl +++ b/home/dot_config/hypr/hyprland.lua.tmpl @@ -78,6 +78,7 @@ hl.on("hyprland.start", function() {{ end }} 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 95% rename from home/dot_config/noctalia/config.toml rename to home/dot_config/noctalia/config.toml.tmpl index bcd27811..77e9568f 100644 --- a/home/dot_config/noctalia/config.toml +++ b/home/dot_config/noctalia/config.toml.tmpl @@ -36,7 +36,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 = "stretch" 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 00000000..d196b324 --- /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[@]}"