{"id":13396781,"url":"https://github.com/sindresorhus/wallpaper","last_synced_at":"2026-10-19T16:51:14.495Z","repository":{"id":29807029,"uuid":"33351424","full_name":"sindresorhus/wallpaper","owner":"sindresorhus","description":"Manage the desktop wallpaper","archived":false,"fork":false,"pushed_at":"2026-09-20T13:00:19.000Z","size":7927,"stargazers_count":1092,"open_issues_count":3,"forks_count":95,"subscribers_count":16,"default_branch":"main","last_synced_at":"2026-10-04T01:55:17.588Z","etag":null,"topics":["desktop-wallpaper","javascript","linux","macos","nodejs","wallpaper","windows"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/sindresorhus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","buy_me_a_coffee":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2015-04-03T07:04:15.000Z","updated_at":"2026-09-27T20:34:30.000Z","dependencies_parsed_at":"2026-09-26T18:49:24.022Z","dependency_job_id":null,"html_url":"https://github.com/sindresorhus/wallpaper","commit_stats":{"total_commits":98,"total_committers":20,"mean_commits":4.9,"dds":0.2142857142857143,"last_synced_commit":"0e1f735b27bc182809551d753b2c7cc74977163d"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/sindresorhus/wallpaper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fwallpaper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fwallpaper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fwallpaper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fwallpaper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/wallpaper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fwallpaper/sbom","scorecard":{"id":826938,"data":{"date":"2025-08-11","repo":{"name":"github.com/sindresorhus/wallpaper","commit":"0e1f735b27bc182809551d753b2c7cc74977163d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":3,"reason":"Found 10/30 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: source/macos-wallpaper:1","Warn: binary detected: source/windows-wallpaper-x86-64.exe:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/wallpaper/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/wallpaper/main.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/main.yml:21","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license:0","Info: FSF or OSI recognized license: MIT License: license:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T16:47:54.559Z","repository_id":29807029,"created_at":"2025-08-23T16:47:54.559Z","updated_at":"2025-08-23T16:47:54.559Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38362293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-19T02:00:06.414Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["desktop-wallpaper","javascript","linux","macos","nodejs","wallpaper","windows"],"created_at":"2024-07-30T18:01:02.989Z","updated_at":"2026-10-19T16:51:14.488Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://buymeacoffee.com/sindresorhus","https://sindresorhus.com/donate"],"categories":["系统","JavaScript","Packages","包","HarmonyOS","目录","Command-line apps"],"sub_categories":["Command-line apps","命令行程序","Windows Manager","命令行应用"],"readme":"# wallpaper\n\n\u003e Get or set the desktop wallpaper\n\nWorks on macOS 10.14.4+, Linux, and Windows 10+.\n\n*Maintainer needed for the Linux part of the code. No new Linux-related changes will be accepted until someone with good Linux knowledge volunteers.*\n\n## Install\n\n```sh\nnpm install wallpaper\n```\n\n## Usage\n\n```js\nimport {getWallpaper, setWallpaper} from 'wallpaper';\n\nawait setWallpaper('unicorn.jpg');\n\nawait getWallpaper();\n//=\u003e '/Users/sindresorhus/unicorn.jpg'\n```\n\n## API\n\n### getWallpaper(options?)\n\nReturns a `Promise\u003cstring\u003e` with the path of the current desktop wallpaper.\n\n#### options\n\nType: `object`\n\n##### screen *(macOS only)*\n\nType: `string | number`\\\nValues: `'all'`, `'main'`, or the index of a screen from `.screens()`\\\nDefault: `'main'`\n\nThe screen to get the wallpaper from.\n\nIf you set `'all'` then `getWallpaper()` will return a `Promise\u003cstring[]\u003e`.\n\n### setWallpaper(imagePath, options?)\n\nReturns a `Promise`.\n\nOn macOS, it sets the wallpaper on the active space. There is no way to set it on all spaces.\n\n#### imagePath\n\nType: `string`\n\nThe path to the image to set as the desktop wallpaper.\n\n#### options\n\nType: `object`\n\n##### screen *(macOS only)*\n\nType: `string | number`\\\nValues: `'all'`, `'main'`, or the index of a screen from `.screens()`\nDefault: `'all'`\n\nThe screen to set the wallpaper on.\n\n*On Linux and Windows it's hard-coded to `'main'`.*\n\n##### scale *(macOS \u0026 Windows)*\n\nType: `string`\\\nmacOS Values: `'auto' | 'fill' | 'fit' | 'stretch' | 'center'`\\\nWindows Values: `'center' | 'stretch' | 'tile' | 'span' | 'fit' | 'fill'`\\\nDefault macOS: `'auto'`\\\nDefault Windows: `'span'`\n\nScaling method.\n\n*On Linux this option is ignored.*\n\n### setSolidColorWallpaper(color, options?) *(macOS only)*\n\nReturns a `Promise`.\n\n#### color\n\nType: `string`\n\nThe color to set as a RGB Hex value. For example, `000000` for black.\n\n#### options\n\nType: `object`\n\n##### screen\n\nType: `string | number`\\\nValues: `'all'`, `'main'`, or the index of a screen from `.screens()`\nDefault: `'all'`\n\nThe screen to set the wallpaper on.\n\n```js\nimport {setSolidColorWallpaper} from 'wallpaper';\n\nawait setSolidColorWallpaper('000000');\n```\n\n### screens() *(macOS only)*\n\nReturns a `Promise\u003cstring[]\u003e` with the available screens.\n\n```js\nimport {screens} from 'wallpaper';\n\nawait screens();\n//=\u003e ['Color LCD']\n```\n\n## FAQ\n\n#### How can I set a website as a static wallpaper?\n\nIf you only need a static snapshot of the website, you can use [`capture-website`](https://github.com/sindresorhus/capture-website) and then pass the result to this package. You can make it semi-dynamic, by capturing the website snapshot every 10 seconds, for example.\n\n#### How can I set a website, video, or WebGL as a dynamic wallpaper?\n\nYou cannot use this package to set a dynamic wallpaper.\n\nOn macOS, check out [Plash](https://github.com/sindresorhus/Plash), which lets you set any website as your wallpaper. The website could contain a fullscreen video, WebGL, slideshow, animated, etc.\n\nYou can also do this with Electron on macOS and Linux by using [`new BrowserWindow({type: 'desktop'})`](https://www.electronjs.org/docs/latest/api/browser-window#new-browserwindowoptions).\n\nOn Windows, you can use [Wallpaper Engine](https://wallpaperengine.io). It's available on Steam, HumbleBundle, and Green Man Gaming for around 4 USD.\n\n## Related\n\n- [wallpaper-cli](https://github.com/sindresorhus/wallpaper-cli) - CLI for this module\n- [macos-wallpaper](https://github.com/sindresorhus/macos-wallpaper) - macOS binary used in this module\n- [windows-wallpaper](https://github.com/sindresorhus/windows-wallpaper) - Windows binary used in this module\n- [trash](https://github.com/sindresorhus/trash) - Move files and directories to the trash\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fwallpaper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fwallpaper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fwallpaper/lists"}