From f0a905d77552a740194da4582b5447af58254e26 Mon Sep 17 00:00:00 2001 From: Andinus Date: Sat, 14 Mar 2020 13:31:45 +0530 Subject: Fix SetFromID & add usage in readme --- README.org | 9 ++++++++- 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) -- cgit 1.4.1-2-gfad0