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: @@ -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

@ -42,11 +42,13 @@ func init() { @@ -42,11 +42,13 @@ 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 {
@ -81,10 +83,6 @@ func main() { @@ -81,10 +83,6 @@ 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)

Loading…
Cancel
Save