Compare commits

..

No commits in common. 'master' and '1.0.0' have entirely different histories.

  1. 2
      .drone.yml
  2. 10
      main.go

2
.drone.yml

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

10
main.go

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

Loading…
Cancel
Save