update wallpapers on start
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful

This commit is contained in:
Simon Vieille 2024-07-31 23:13:59 +02:00
commit e229ae1440
Signed by: deblan
GPG key ID: 579388D585F70417
4 changed files with 25 additions and 21 deletions

10
main.go
View file

@ -21,17 +21,13 @@ func main() {
os.Exit(1)
}
UpdateWallapers(config)
for recv.Next() {
event := recv.Event().(*i3.WorkspaceEvent)
if event.Change == "focus" {
cmd, err := HandleFocusEvent(config)
if err != nil {
log.Printf("[ERROR] cmd=%s error=%s", cmd.String(), err.Error())
} else {
log.Printf("[SUCCESS] cmd=%s", cmd.String())
}
UpdateWallapers(config)
}
}
}