#壁纸 #颜色 #天空 #图案 #随机 #OpenWeatherMap #早期

应用程序 sky-color-wallpaper

根据天空颜色设置随机壁纸

5 个不稳定版本

0.3.1 2019年11月17日
0.3.0 2019年11月5日
0.2.1 2019年10月12日
0.2.0 2019年10月4日
0.1.0 2019年10月1日

#7 in #天空

MIT/Apache

31KB
564 代码行

sky-color-wallpaper

CI codecov dependency status Crates.io Crates.io

根据天空颜色设置随机壁纸。

灵感来自 sky-color-clock.el.

支持的平台

  • Windows
  • macOS
  • Linux
    • Gnome
    • KDE
    • Cinnamon
    • Unity
    • Budgie
    • XFCE
    • LXDE
    • MATE
    • Deepin
    • i3
    • xmonad
    • bspwm

安装

GitHub 发布

https://github.com/qryxip/sky-color-wallpaper/releases

cargo install (crates.io)

$ cargo install sky-color-wallpaper

cargo install (GitHub)

$ cargo install --git https://github.com/qryxip/sky-color-wallpaper

用法

首先,将一个 sky_color_wallpaper.yml 放入 配置目录

---
longitude: 139.759
latitude: 35.6828

# optional
openweathermap:
  default: Clear
  # https://openweathermap.org/users/sign_up
  api_key:
    type: file
    path: ~/apikeys/openweathermap.txt

_:
  # https://openweathermap.org/weather-conditions
  # integer (ID) or string (Main)
  clouds: &clouds
    - Mist
    - Smoke
    - Haze
    - Dust
    - Fog
    - Sand
    - Ash
    - Clouds
  rain: &rain
    - Thunderstorm
    - Dizzle
    - Rain
    - Squall
    - Tornado
  snow: &snow
    - Snow
  clear: &clear
    - Clear

midnight:
  - patterns: [~/Pictures/wallpapers/sky_color_wallpaper/midnight/*] # https://docs.rs/glob/0.3/glob/struct.Pattern.html
morning:
  - on: *clouds
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/morning/clouds/*]
  - on: *rain
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/morning/rain/*]
  - on: *snow
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/morning/snow/*]
  - on: *clear
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/morning/clear/*]
early_afternoon:
  - on: *clouds
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/early_afternoon/clouds/*]
  - on: *rain
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/early_afternoon/rain/*]
  - on: *snow
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/early_afternoon/snow/*]
  - on: *clear
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/early_afternoon/clear/*]
late_afternoon: # [sunset - 90min, sunset)
  - on: *clouds
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/late_afternoon/clouds/*]
  - on: *rain
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/late_afternoon/rain/*]
  - on: *snow
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/late_afternoon/snow/*]
  - on: *clear
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/late_afternoon/clear/*]
evening:
  - on: *clouds
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/evening/clouds/*]
  - on: *rain
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/evening/rain/*]
  - on: *snow
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/evening/snow/*]
  - on: *clear
    patterns: [~/Pictures/wallpapers/sky_color_wallpaper/evening/clear/*]

并在启动时运行 sky-color-wallpaper(.exe)。

许可证

根据 MITApache-2.0 许可。

依赖

~32–44MB
~857K SLoC