{"id":13478966,"url":"https://github.com/mczachurski/wallpapper","last_synced_at":"2025-05-14T01:02:30.160Z","repository":{"id":37336260,"uuid":"140696883","full_name":"mczachurski/wallpapper","owner":"mczachurski","description":":computer: Console application for creating dynamic wallpapers for macOS Mojave and newer","archived":false,"fork":false,"pushed_at":"2025-01-01T12:15:40.000Z","size":4696,"stargazers_count":3356,"open_issues_count":18,"forks_count":135,"subscribers_count":55,"default_branch":"master","last_synced_at":"2025-04-12T22:16:29.288Z","etag":null,"topics":["dynamic","dynamic-wallpapers","macos","swift","wallpaper"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mczachurski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-12T10:13:20.000Z","updated_at":"2025-04-11T08:41:50.000Z","dependencies_parsed_at":"2025-01-24T20:00:45.751Z","dependency_job_id":"9d48fbbb-8bfc-4061-bb23-5be8cdc28f2e","html_url":"https://github.com/mczachurski/wallpapper","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mczachurski%2Fwallpapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mczachurski%2Fwallpapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mczachurski%2Fwallpapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mczachurski%2Fwallpapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mczachurski","download_url":"https://codeload.github.com/mczachurski/wallpapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637787,"owners_count":21137538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dynamic","dynamic-wallpapers","macos","swift","wallpaper"],"created_at":"2024-07-31T16:02:06.756Z","updated_at":"2025-04-12T22:16:40.061Z","avatar_url":"https://github.com/mczachurski.png","language":"Swift","funding_links":[],"categories":["Swift","Applications","Terminal","swift","MacOS"],"sub_categories":["Terminal","Text","Projects-Demo","📺 Terminal (13)"],"readme":"# 💻 wallpapper / wallpapper-exif\n\n![Build Status](https://github.com/mczachurski/wallpapper/workflows/Build/badge.svg)\n[![Swift 5.2](https://img.shields.io/badge/Swift-5.2-orange.svg?style=flat)](ttps://developer.apple.com/swift/)\n[![Swift Package Manager](https://img.shields.io/badge/SPM-compatible-4BC51D.svg?style=flat)](https://swift.org/package-manager/)\n[![Platforms OS X | Linux](https://img.shields.io/badge/Platforms-macOS%20-lightgray.svg?style=flat)](https://developer.apple.com/swift/)\n\n![wallpaper](Images/wallpaper.png)\n\nThis is simple console application for macOS to create dynamic wallpapers introduced in macOS Mojave. [Here](https://www.youtube.com/watch?v=TVqfPzdsbzY) you can watch how dynamic wallpapers works. Also you can read more about dynamic wallpapers in following articles:\n\n- [macOS Mojave dynamic wallpaper](https://itnext.io/macos-mojave-dynamic-wallpaper-fd26b0698223)\n- [macOS Mojave dynamic wallpapers (II)](https://itnext.io/macos-mojave-dynamic-wallpapers-ii-f8b1e55c82f)\n- [macOS Mojave dynamic wallpapers (III)](https://itnext.io/macos-mojave-wallpaper-iii-c747c30935c4)\n\n## Examples\n\nBelow you can download prepared dynamic wallpapers:\n\n- Earth view ([download](https://www.dropbox.com/s/kd2g59qswchsd0v/Earth%20View.heic?dl=0))\n![earth](Images/earth-01.gif)\n\n- Cyberpunk 2077 ([download](https://www.dropbox.com/s/54iupz5kmveh61j/cyberpunk-01.heic?dl=0))\n![cyberpunk](Images/cyberpunk-01.gif)\n\n## Build and install\n\nYou need to have latest XCode (10.2) and Swift 5 installed.\n\n### Homebrew\n\nOpen your terminal and run following commands.\n\n```bash\nbrew tap mczachurski/wallpapper\nbrew install wallpapper\n```\n\n### Manually\n\nOpen your terminal and run following commands.\n\n```bash\n$ git clone https://github.com/mczachurski/wallpapper.git\n$ cd wallpapper\n$ swift build --configuration release\n$ sudo cp .build/release/wallpapper /usr/local/bin\n$ sudo cp .build/release/wallpapper-exif /usr/local/bin\n```\n\nIf you are using swift in version 4.1, please edit `Package.swift` file and put there your version of swift (in first line).\n\nAlso you can build using `build.sh` script (it uses `swiftc` instead Swift CLI).\n\n```bash\n$ git clone https://github.com/mczachurski/wallpapper.git\n$ cd wallpapper\n$ ./build.sh\n$ sudo cp .output/wallpapper /usr/local/bin\n$ sudo cp .output/wallpapper-exif /usr/local/bin\n```\n\nNow in the console you can run `wallpapper -h` and you should got a response similar to the following one.\n\n```bash\nwallpapper: [command_option] [-i jsonFile] [-e heicFile]\nCommand options are:\n -h            show this message and exit\n -v            show program version and exit\n -o            output file name (default is 'output.heic')\n -i            input .json file with wallpaper description\n -e            input .heic file to extract metadata\n```\n\nThat's all. Now you can build your own dynamic wallpappers.\n\n### Troubleshooting\n\nIf you get an error during the Swift build portion of install, try downloading the entire Xcode IDE (not just the tools) from the app store. Then run \n\n```bash\nsudo xcode-select -s /Applications/Xcode.app/Contents/Developer \n```\n\nand run the installation command again.\n\n## Getting started\n\nIf you have done above commands now you can build dynamic wallpaper. It's really easy. First you have to put all you pictures into one folder and in the same folder create `json` file with picture's description. Application support three kinds of dynamic wallpapers. \n\n### Solar\n\nFor wallpaper which based on solar coordinates `json` file have to have structure like on below snippet.\n\n```json\n[\n  {\n    \"fileName\": \"1.png\",\n    \"isPrimary\": true,\n    \"isForLight\": true,\n    \"altitude\": 27.95,\n    \"azimuth\": 279.66\n  },\n  {\n    \"fileName\": \"2.png\",\n    \"altitude\": -31.05,\n    \"azimuth\": 4.16\n  },\n  ...\n  {\n    \"fileName\": \"16.png\",\n    \"isForDark\": true,\n    \"altitude\": -28.63,\n    \"azimuth\": 340.41\n  }\n]\n```\n\nProperties:\n\n- `fileName` - name of picture file name (you can use same file for few nodes).\n- `isPrimary` - information about image which is primary image (it will be visible after creating `heic` file). Only one of the file can be primary.\n- `isForLight` - if `true` picture will be displayed when user chose \"Light (static)\" wallpaper\n- `isForDark` - if `true` picture will be displayed when user chose \"Dark (static)\" wallpaper\n- `altitude` - is the angle between the Sun and the observer's local horizon.\n- `azimuth` - that is the angle of the Sun around the horizon.\n\nTo calculate proper altitude and azimuth you can use `wallpapper-exif` application or web page: [https://keisan.casio.com/exec/system/1224682277](https://keisan.casio.com/exec/system/1224682277). In web page you have to put place where you take a photo and the date. Then system generate for you altitude and azimuth of the Sun during whole day.\n\n### Time\n\nFor wallpaper which based on OS time `json` file have to have structure like on below snippet.\n\n```json\n[\n    {\n        \"fileName\": \"1.png\",\n        \"isPrimary\": true,\n        \"isForLight\": true,\n        \"time\": \"2012-04-23T10:25:43Z\"\n    },\n    {\n        \"fileName\": \"2.png\",\n        \"time\": \"2012-04-23T14:32:12Z\"\n    },\n    {\n        \"fileName\": \"3.png\",\n        \"time\": \"2012-04-23T18:12:01Z\"\n    },\n    {\n        \"fileName\": \"4.png\",\n        \"isForDark\": true,\n        \"time\": \"2012-04-23T20:10:45Z\"\n    }\n]\n```\n\nProperties:\n\n- `fileName` - name of picture file name (you can use same file for few nodes).\n- `isPrimary` - information about image which is primary image (it will be visible after creating `heic` file). Only one of the file can be primary.\n- `isForLight` - if `true` picture will be displayed when user chose \"Light (static)\" wallpaper\n- `isForDark` - if `true` picture will be displayed when user chose \"Dark (static)\" wallpaper\n- `time` - time when wallpaper will be changed (most important is hour).\n\n### Apperance\n\nFor wallpapers based on OS apperance settings (light/dark) we have to prepare much simpler JSON file, and we have to use only two images (one for light and one for dark theme). \n\n```json\n[\n    {\n        \"fileName\": \"1.png\",\n        \"isPrimary\": true,\n        \"isForLight\": true\n    },\n    {\n        \"fileName\": \"2.png\",\n        \"isForDark\": true\n    }\n]\n```\n\nProperties:\n\n- `fileName` - name of picture file name.\n- `isPrimary` - information about image which is primary image (it will be visible after creating `heic` file). Only one of the file can be primary.\n- `isForLight` - if `true` picture will be displayed when user uses light theme\n- `isForDark` - if `true` picture will be displayed when user uses dark theme\n\n### Preparing wallpapers\n\nWhen you have `json` file and all pictures then you can generate `heic` file. You have to run following command:\n\n```bash\nwallpapper -i wallpapper.json\n```\n\nYou should got a new file: `output.heic`. Set this file as a new wallpaper and enjoy you own dynamic wallpaper! \n\n### Extracting metadata\n\nYou can extract metadata from existing `heic` file. You have to run following command:\n\n```bash\nwallpapper -e Catalina.heic\n```\n\nMetadata should be printed as output on the console.\n\nAlso it's possible to extract and save whole `plist` file:\n\n```bash\nwallpapper -e Catalina.heic -o output.plist\n```\n\n### Calculating sun position\n\nIf your photos contains GPS Exif metadata and creation time you can use `wallpapper-exif` application to generate `json` file with Sun `altitude` and `azimuth`. Example application usage:\n\n```bash\n$ wallpapper-exif 1.jpeg 2.jpeg 3.jpeg\n```\n\n`json` should be produced as output on the console.\n\nSun calculations has been created based on the [JavaScript library](https://github.com/mourner/suncalc) created by [Vladimir Agafonkin](http://agafonkin.com/en) ([@mourner](https://github.com/mourner)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmczachurski%2Fwallpapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmczachurski%2Fwallpapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmczachurski%2Fwallpapper/lists"}