🌈️ apply a wallpaper based on the weather outside
0

Configure Feed

Select the types of activity you want to include in your feed.

feat(apply): macOS wallpaper

Angel Wang (Jun 26, 2026, 7:17 PM -0600) 823b6dca 4f4fdd55

+8 -4
+8 -4
src/apply/index.ts
··· 110 110 111 111 console.info(`Setting wallpaper...`) 112 112 113 - if (Deno.build.os != "windows") { 114 - await $`eval ${config.applyWallpaperCommand.replace("%s", matchingImages[0].path)}` 115 - } else { 113 + 114 + if (Deno.build.os == "windows") { 116 115 const command = ` 117 116 $setwallpapersrc = @" 118 117 using System.Runtime.InteropServices; ··· 136 135 usePowerShell() 137 136 // await $`Write-Host ${command}` 138 137 await $`${command} | iex` 138 + } else if (Deno.build.os == "darwin") { 139 + const command = `tell application "System Events" to set picture of (reference to current desktop) to "${matchingImages[0].path}"` 140 + await $`osascript -e ${command}` 141 + } else { 142 + await $`eval ${config.applyWallpaperCommand.replace("%s", matchingImages[0].path)}` 139 143 } 140 144 141 - console.info(`Success! Enjoy :)`) 145 + console.info(`Success! Enjoy :)`)