feat(launcher): wallpaper auto-apply from device config
Stores wallpaper URL(s) in event_device.other_json.launcher.wallpaper and auto-applies on all native Launcher instances within one heartbeat cycle (~60s), eliminating manual per-Mac setup at events. - electron_relay: typed set_wallpaper wrapper (url, url_external, display, auth headers) - launcher_defaults: wallpaper_applied_url tracking + section_state__wallpaper - launcher_cfg_wallpaper: new config section — save to device config + apply now - launcher_cfg: add wallpaper section to device tab - launcher_background_sync: auto-apply if config URL changed since last apply; external-only config targets only the secondary display, leaving built-in unchanged Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -384,13 +384,33 @@ export async function control_presentation({
|
||||
|
||||
// 4. System Management (Phase 5+)
|
||||
|
||||
export async function set_wallpaper({ path }: { path: string }) {
|
||||
export async function set_wallpaper({
|
||||
path,
|
||||
url,
|
||||
url_external,
|
||||
display = 'all',
|
||||
api_key,
|
||||
account_id
|
||||
}: {
|
||||
/** Local file path (existing behavior). */
|
||||
path?: string;
|
||||
/** HTTPS URL — downloaded to ~/Library/Caches/OSIT/wallpaper/ before applying. */
|
||||
url?: string;
|
||||
/** Optional separate URL for the external/projector display only. */
|
||||
url_external?: string;
|
||||
/** Which display(s) to target. Defaults to 'all'. */
|
||||
display?: 'all' | 'primary' | 'external';
|
||||
/** Aether API key passed as x-aether-api-key header on the download request. */
|
||||
api_key?: string;
|
||||
/** Aether account ID passed as x-account-id header on the download request. */
|
||||
account_id?: string;
|
||||
}) {
|
||||
if (!native || !native.set_wallpaper)
|
||||
return {
|
||||
success: false,
|
||||
error: 'Native handler set_wallpaper not available'
|
||||
};
|
||||
return await native.set_wallpaper({ path });
|
||||
return await native.set_wallpaper({ path, url, url_external, display, api_key, account_id });
|
||||
}
|
||||
|
||||
export async function update_app(args: {
|
||||
|
||||
Reference in New Issue
Block a user