在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):sindresorhus/macos-wallpaper开源软件地址(OpenSource Url):https://github.com/sindresorhus/macos-wallpaper开源编程语言(OpenSource Language):Swift 100.0%开源软件介绍(OpenSource Introduction):macos-wallpaper
This is both a command-line app and a Swift package. It correctly handles getting the active wallpaper even when the wallpaper is set to a directory. CLIRequires macOS 10.14.4 or later. InstallHomebrewbrew install wallpaper ManuallyDownload the binary and put it in UsageBy default, it sets and gets the wallpaper for all screens. Use the
Setwallpaper set unicorn.jpg Set solid colorwallpaper set-solid-color 0000ff Getwallpaper get
/Users/sindresorhus/unicorn.jpg APIBuilding this requires the latest Xcode and macOS version. The package supports macOS 10.14.4 or later. InstallAdd the following to .package(url: "https://github.com/sindresorhus/macos-wallpaper", from: "2.3.1") Usageimport Wallpaper
let imageURL = URL(fileURLWithPath: "<path>", isDirectory: false)
try! Wallpaper.set(imageURL, screen: .main, scale: .fill)
let solidColor = NSColor.blue
try! Wallpaper.set(solidColor, screen: .main)
print(try! Wallpaper.get(screen: .main)) See the source for more. DevRunswift run wallpaper Buildswift build --configuration=release --arch arm64 --arch x86_64 && mv .build/apple/Products/Release/wallpaper . Related
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论