John Mylchreest 1f8d1fc0ba config: re-add source= include directive support (#303)
* feat(config): re-add source= include directive support

Re-implements the source= directive for including external config files,
which was originally added in PR #267 for v0.7.6 but lost during the
v0.8.0 hyprtoolkit rewrite.

Features:
- Include external config files using source=/path/to/file.conf
- Glob pattern support (e.g., source=~/.config/hypr/hyprpaper.d/*.conf)
- Tilde expansion for home directory paths
- Relative paths resolved relative to the current config file
- Proper error handling and logging for missing/invalid files

This restores parity with Hyprland's source= behavior, enabling modular
configuration management that was lost in the v0.8.0 transition.

Fixes: hyprwm/hyprpaper#302

* feat(config): add debug logging for source= directive

Adds LOG_DEBUG calls to help troubleshoot config include issues:
- Log when source= directive is encountered with resolved path
- Log number of files matched by glob patterns
- Log each file before parsing

* refactor(config): address PR review feedback & rebase against main

- Use Hyprutils::String::trim() instead of manual whitespace trimming
- Use Hyprutils::Utils::CScopeGuard for glob cleanup instead of manual
  globfree() calls
- Remove braces from short single-line if statements per style guide
- Remove duplicate absolutePath(), extend getPath() with optional
  basePath parameter instead

For source= directives, relative paths need to resolve relative to the
config file's directory, not CWD. So `source = ./themes/dark.conf` in
`~/.config/hypr/hyprpaper.conf` resolves to
`~/.config/hypr/themes/dark.conf`, not `$CWD/themes/dark.conf`.

* fix(config): address PR review feedback

- Use std::error_code for filesystem calls to avoid exceptions
- Move getCurrentConfigPath() body from header to cpp file
- Apply clang-format
2026-01-02 22:16:43 +01:00
2025-12-04 17:58:54 +00:00
2025-12-04 17:58:54 +00:00
2025-12-18 12:36:36 +02:00
2025-12-04 17:58:54 +00:00
2025-12-04 17:58:54 +00:00
2025-12-29 17:00:47 +01:00

hyprpaper

Hyprpaper is a simple and fast wallpaper utility for Hyprland with the ability to dynamically change wallpapers through sockets.

Features

  • Per-output wallpapers
  • fill, tile, cover or contain modes
  • fractional scaling support
  • IPC for fast wallpaper switches

Installation

Arch Linux: pacman -S hyprpaper

OpenSuse Linux: zypper install hyprpaper

Manual:

Dependencies

The development files of these packages need to be installed on the system for hyprpaper to build correctly. (Development packages are usually suffixed with -dev or -devel in most distros' repos).

  • hyprtoolkit
  • hyprlang
  • hyprutils
  • hyprwire

Building

Building is done via CMake:

cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
cmake --build ./build --config Release --target hyprpaper -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`

Install with:

cmake --install ./build
Description
Hyprpaper is a blazing fast wayland wallpaper utility with IPC controls.
Readme BSD-3-Clause 1.2 MiB
Languages
C++ 78.4%
CMake 11.3%
Nix 10.3%