func (s *ScreenChangeHandlerStruct) Start(logger *log.Logger, activityCh chan *activity.Instance) {
	s.tickerCh = make(chan struct{})
	s.screenHandlerLogger = logger.WithFields(log.Fields{
		"method": "screen-change-handler",
	})
	go func() {
		lastScreenTitle := robotgo.GetTitle()
		for range s.tickerCh {
			s.screenHandlerLogger.Debugf("screen change checked")
			commCh := make(chan *screenInfo)
			go checkScreenChange(s.screenHandlerLogger, commCh, lastScreenTitle)
			select {
			case screenInfo := <-commCh:
				if screenInfo.didScreenChange {
					activityCh <- &activity.Instance{
						Type: screenChangeActivity,
					}
					lastScreenTitle = screenInfo.currentScreenTitle
				}
			case <-time.After(timeout * time.Millisecond):
				s.screenHandlerLogger.Debugf("timeout happened after %vms while checking screen change handler", timeout)
			}
		}
		s.screenHandlerLogger.Infof("stopping screen change handler")
		return
	}()
}
Start the handler
package handler
import (
	"time"
	log "github.com/sirupsen/logrus"
	"github.com/go-vgo/robotgo"
	"github.com/prashantgupta24/activity-tracker/pkg/activity"
	"github.com/prashantgupta24/activity-tracker/pkg/system"
)
const (
	screenChangeActivity = activity.ScreenChange
)
type ScreenChangeHandlerStruct struct {
	screenHandlerLogger *log.Entry
	tickerCh            chan struct{}
}
type screenInfo struct {
	didScreenChange    bool
	currentScreenTitle string
}