summary refs log tree commit diff stats
path: root/cmd/cetus/cetus.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/cetus/cetus.go')
-rw-r--r--cmd/cetus/cetus.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/cetus/cetus.go b/cmd/cetus/cetus.go
index 35afd01..e6799c8 100644
--- a/cmd/cetus/cetus.go
+++ b/cmd/cetus/cetus.go
@@ -24,6 +24,7 @@ import (
 func main() {
 	var (
 		photoID string
+		random  bool
 
 		width  int
 		height int
@@ -32,6 +33,7 @@ func main() {
 	)
 
 	flag.StringVar(&photoID, "photo-id", "", "Unsplash Photo ID to set as background")
+	flag.BoolVar(&random, "random", true, "Set a random photo as background")
 
 	flag.IntVar(&width, "width", 1920, "Width of the image")
 	flag.IntVar(&height, "height", 1080, "Height of the image")
@@ -43,6 +45,12 @@ func main() {
 		errChk(err)
 		return
 	}
+
+	if random {
+		err = unsplash.SetRandom(width, height)
+		errChk(err)
+		return
+	}
 }
 
 func errChk(err error) {