sky-color-wallpaper

Crates.iosky-color-wallpaper
lib.rssky-color-wallpaper
version0.3.1
sourcesrc
created_at2019-10-01 16:07:07.194356
updated_at2019-11-17 17:41:40.222815
descriptionSet random wallpapers according to sky color
homepage
repositoryhttps://github.com/qryxip/sky-color-wallpaper
max_upload_size
id169119
size151,189
Ryo Yamashita (qryxip)

documentation

README

sky-color-wallpaper

CI codecov dependency status Crates.io Crates.io

Set random wallpapers according to sky color.

Inspired by sky-color-clock.el.

Supported platforms

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

Installation

GitHub Releases

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

Usage

First, put a sky_color_wallpaper.yml in the config directory.

---
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/*]

And run sky-color-wallpaper(.exe) at the startup.

License

Licensed under MIT OR Apache-2.0.

Commit count: 43

cargo fmt