diff options
author | Andinus <andinus@inventati.org> | 2020-03-14 13:31:45 +0530 |
---|---|---|
committer | Andinus <andinus@inventati.org> | 2020-03-14 13:31:45 +0530 |
commit | f0a905d77552a740194da4582b5447af58254e26 (patch) | |
tree | af1851951e2889901eac85444acedd9345b887cb | |
parent | ea8a01e9ae40f5478167abcf4563682adc77efb6 (diff) | |
download | cetus-f0a905d77552a740194da4582b5447af58254e26.tar.gz |
Fix SetFromID & add usage in readme
-rw-r--r-- | README.org | 9 | ||||
-rw-r--r-- | pkg/unsplash/unsplash.go | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/README.org b/README.org index 8cc92cd..894c5e9 100644 --- a/README.org +++ b/README.org @@ -8,7 +8,7 @@ wallpapers. * Features - set a specific photo as wallpaper - customize wallpaper size -* pppDemo +* Demo I just run some cetus commands on my computer, nothing fancy. I'll make better demo videos someday. @@ -17,3 +17,10 @@ demo videos someday. | v0.2.0 | https://diode.zone/videos/watch/12db31e1-3517-4888-ad06-55f3859447a1 | * Dependency - [[https://feh.finalrewind.org/][feh]] +* Usage +** photo-id +photo-id flag can be used to set a specific photo as background. +#+BEGIN_SRC sh +cetus -width 1920 -height 1080 \ + -photo-id=FzrjgIId6NU +#+END_SRC diff --git a/pkg/unsplash/unsplash.go b/pkg/unsplash/unsplash.go index 3070716..e40503d 100644 --- a/pkg/unsplash/unsplash.go +++ b/pkg/unsplash/unsplash.go @@ -29,7 +29,7 @@ func SetFromID(photoID string, width int, height int) error { err error ) - size = fmt.Sprintf("%sx%s", width, height) + size = fmt.Sprintf("%dx%d", width, height) path = fmt.Sprintf("%s/%s/%s", "https://source.unsplash.com", photoID, size) err = background.Set(path) |