Expand description
Platform layer: finding the monitors and setting the desktop wallpaper.
The OS wallpaper APIs only set static images (PLAN.md section 2). A
WallpaperHost wraps one OS’s API: list the monitors with stable ids and
physical sizes, read and set each monitor’s wallpaper. detect picks the
host for the running system. StillStore writes each still under a new
file name, because some systems don’t reload an unchanged path.
Windows (IDesktopWallpaper, per monitor) and macOS (NSWorkspace, per
screen) are implemented. Elsewhere detect says the wallpaper isn’t
set here: the scenes still render (clairlune-cli render, gif).
Modules§
- usage
- What this process uses (CPU time, memory), for the log. What this process uses, for the log: CPU time so far, and memory now (on macOS the footprint Activity Monitor shows, GPU surfaces included).
Structs§
- Capabilities
- What a host can do.
- Monitor
- One monitor, in physical pixels.
- Snapshot
- The wallpaper as it was before Clairlune first set one, so it can be put back: each monitor’s image (or none) and the system’s fit mode.
- Still
Store
Enums§
Constants§
- BACKGROUND_
ARG - The argument a sign-in launch passes: start quietly, no window.
Traits§
- Wallpaper
Host - One system’s wallpaper API.
Functions§
- app_
config_ dir - Clairlune’s configuration directory:
<config>/clairlune. - app_
data_ dir - Clairlune’s data directory (stills, archive, logs):
<local data>/clairlune. - config_
dir - The per-user configuration directory: Roaming AppData on Windows,
~/Library/Application Supporton macOS,$XDG_CONFIG_HOME(or~/.config) elsewhere. - detect
- The host for the running system.
- init_
dpi_ awareness - Makes the process aware of each monitor’s DPI so sizes come back in physical pixels. Call once, before any window or monitor query. A no-op where it does not apply.
- local_
data_ dir - The per-user local data directory: Local AppData on Windows,
~/Library/Application Supporton macOS,$XDG_DATA_HOME(or~/.local/share) elsewhere. - login_
entry_ outdated - Whether the login entry for
exeis one from 0.12 or older (Windows), which starts it withoutBACKGROUND_ARG. - on_
battery - Running on battery power.
- open_
login_ items_ settings - Opens where the user switches start at login on: System Settings > General > Login Items (macOS), Settings > Apps > Startup (Windows). Nothing elsewhere.
- open_
url - Opens a web page in the default browser (
&and%in it are safe). - pictures_
dir - The user’s Pictures folder (exports go to
Pictures/Clairlune). - set_
start_ at_ login - Registers or removes
exeas a login item (per user, no admin rights), started withBACKGROUND_ARG. - start_
at_ login - Whether
exeis registered to start at login;Nonewhere this build can’t manage login items. - start_
at_ login_ needs_ approval - Start at login is registered but switched off where only the user can
switch it on: macOS’s System Settings > General > Login Items, or
Windows’ Settings > Apps > Startup.
falseelsewhere. - system_
prefers_ dark - Whether the system asks apps for a dark appearance, when that is known.
- taskbar_
is_ light - Whether the taskbar (where the tray icon sits) is light, when that is known: Windows only (macOS tints a template icon itself).