Compare commits

2 Commits

Author SHA1 Message Date
298750f396 Cleaning for macOS fixes
Some checks failed
continuous-integration/drone/push Build is failing
2022-02-25 10:07:10 -05:00
aef66840fc Fix typo
Some checks failed
continuous-integration/drone/push Build is failing
2022-02-25 09:53:08 -05:00
2 changed files with 7 additions and 5 deletions

View File

@ -6,7 +6,7 @@ steps:
- name: Build
image: golang
commands:
- go get ./..
- go get ./...
- go vet -v
- env
- GOOS="linux" go build -ldflags="-w -s" -o BackgroundDaemon-Linux

10
main.go
View File

@ -42,13 +42,11 @@ func init() {
func main() {
flag.Parse()
background, err := wallpaper.Get()
if err != nil {
log.Panicln(err)
}
bounds := screenshot.GetDisplayBounds(0)
var img image.Image
var err error
if useRandom {
img, err = loadRandomUnsplashImage(bounds.Dx(), bounds.Dy())
if err != nil {
@ -83,6 +81,10 @@ func main() {
log.Panicln(err)
}
} else {
background, err := wallpaper.Get()
if err != nil {
log.Panicln(err)
}
img, err = loadImage(background)
if err != nil {
log.Println(background)