mirror of
https://github.com/prashantgupta24/automatic-mouse-mover.git
synced 2024-12-22 08:24:11 +00:00
integrated latest activity tracker changes
This commit is contained in:
parent
665b40fce3
commit
7947ace94b
15
go.mod
15
go.mod
@ -1,6 +1,7 @@
|
||||
module github.com/prashantgupta24/automatic-mouse-mover
|
||||
|
||||
require (
|
||||
bou.ke/monkey v1.0.1 // indirect
|
||||
github.com/deckarep/gosx-notifier v0.0.0-20180201035817-e127226297fb
|
||||
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 // indirect
|
||||
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 // indirect
|
||||
@ -10,9 +11,17 @@ require (
|
||||
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f // indirect
|
||||
github.com/getlantern/systray v0.0.0-20190131073753-26d5b920200d
|
||||
github.com/go-stack/stack v1.8.0 // indirect
|
||||
github.com/go-vgo/robotgo v0.0.0-20190321150332-9d92e0f852ca
|
||||
github.com/go-vgo/robotgo v0.0.0-20190409154511-f2a0505446b2
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
|
||||
github.com/lxn/win v0.0.0-20190311093451-0040366d7450 // indirect
|
||||
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95 // indirect
|
||||
github.com/otiai10/mint v1.2.3 // indirect
|
||||
github.com/oxtoacart/bpool v0.0.0-20190227141107-8c4636f812cc // indirect
|
||||
github.com/prashantgupta24/activity-tracker v0.4.0
|
||||
github.com/sirupsen/logrus v1.4.0
|
||||
github.com/prashantgupta24/activity-tracker v1.0.0
|
||||
github.com/robotn/gohook v0.0.0-20190318172628-a7a38946710e // indirect
|
||||
github.com/sirupsen/logrus v1.4.1
|
||||
github.com/stretchr/testify v1.3.0
|
||||
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f // indirect
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect
|
||||
golang.org/x/sys v0.0.0-20190410170021-cc4d4f50624c // indirect
|
||||
)
|
||||
|
34
go.sum
34
go.sum
@ -1,3 +1,5 @@
|
||||
bou.ke/monkey v1.0.1 h1:zEMLInw9xvNakzUUPjfS4Ds6jYPqCFx3m7bRmG5NH2U=
|
||||
bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e h1:4ZrkT/RzpnROylmoQL57iVUL57wGKTR5O6KpVnbm2tA=
|
||||
@ -28,31 +30,43 @@ github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNI
|
||||
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-vgo/robotgo v0.0.0-20190311142943-193b4935d4b1/go.mod h1:jRysmxT/HqVgkZAFBsYVjLHRrsrEUUKx19xHLNPVYM0=
|
||||
github.com/go-vgo/robotgo v0.0.0-20190321150332-9d92e0f852ca h1:TUqm5e4QD14kygf1AkXLxcn6sBdhh2SuEjPXaFrwEis=
|
||||
github.com/go-vgo/robotgo v0.0.0-20190321150332-9d92e0f852ca/go.mod h1:btNdXfFVS5B5p/iqUKRaaSuJfETYNbMv6wG8fL2onK0=
|
||||
github.com/go-vgo/robotgo v0.0.0-20190409154511-f2a0505446b2 h1:MZDN+WGq7OWNjSehLDUkU9FldZAyW+VvIRvOHhFmyog=
|
||||
github.com/go-vgo/robotgo v0.0.0-20190409154511-f2a0505446b2/go.mod h1:SuHEHSAfTxZxjSz0rfMWSkYaHwNbNz4eIIC/UFVvryE=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/lxn/win v0.0.0-20190226192825-50e22abd4ff9 h1:7noriXA0DUpF8QGGBsuGCRn+LLs7uR0MlDfVccQuvEg=
|
||||
github.com/lxn/win v0.0.0-20190226192825-50e22abd4ff9/go.mod h1:jACzEp9RV7NhfPJQkiCNTteU4nkZZVlvkNpYtVOZPfE=
|
||||
github.com/lxn/win v0.0.0-20190311093451-0040366d7450 h1:jB6Qj4k3jLhRQ7QxW6aycyLQr5oGNvNWeGv/4+az2Qk=
|
||||
github.com/lxn/win v0.0.0-20190311093451-0040366d7450/go.mod h1:jACzEp9RV7NhfPJQkiCNTteU4nkZZVlvkNpYtVOZPfE=
|
||||
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95 h1:+OLn68pqasWca0z5ryit9KGfp3sUsW4Lqg32iRMJyzs=
|
||||
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
|
||||
github.com/otiai10/gosseract v2.2.1+incompatible h1:Ry5ltVdpdp4LAa2bMjsSJH34XHVOV7XMi41HtzL8X2I=
|
||||
github.com/otiai10/gosseract v2.2.1+incompatible/go.mod h1:XrzWItCzCpFRZ35n3YtVTgq5bLAhFIkascoRo8G32QE=
|
||||
github.com/otiai10/mint v1.2.3 h1:PsrRBmrxR68kyNu6YlqYHbNlItc5vOkuS6LBEsNttVA=
|
||||
github.com/otiai10/mint v1.2.3/go.mod h1:YnfyPNhBvnY8bW4SGQHCs/aAFhkgySlMZbrF5U0bOVw=
|
||||
github.com/oxtoacart/bpool v0.0.0-20190227141107-8c4636f812cc h1:uhnyuvDwdKbjemAXHKsiEZOPagHim2nRjMcazH1g26A=
|
||||
github.com/oxtoacart/bpool v0.0.0-20190227141107-8c4636f812cc/go.mod h1:L3UMQOThbttwfYRNFOWLLVXMhk5Lkio4GGOtw5UrxS0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prashantgupta24/activity-tracker v0.3.1 h1:+jKFqnve2316ZgWgrYgd+go+ocphaN3EgfeEMfW7lhA=
|
||||
github.com/prashantgupta24/activity-tracker v0.3.1/go.mod h1:hZjTk+hYxhxGutmSNiFTk3+OebO3RTNki5gA/5hIPkM=
|
||||
github.com/prashantgupta24/activity-tracker v0.4.0 h1:wIsVFIo4h8GSe08QTPRbqEfBeAjX16WHdFOUb98MKCw=
|
||||
github.com/prashantgupta24/activity-tracker v0.4.0/go.mod h1:erO/ZDFDjCvt8BgqWwYkFggJOcrwjGGROcM0WwYRwzE=
|
||||
github.com/prashantgupta24/activity-tracker v1.0.0 h1:qcsTP5DPAMBETpQc6QV7/JuP7imI65Tu+OdK5dt9I9M=
|
||||
github.com/prashantgupta24/activity-tracker v1.0.0/go.mod h1:+1NWPFsClYr0WU4MIUEtraA461IueZpd8WyEUEzqgbo=
|
||||
github.com/prashantgupta24/mac-sleep-notifier v0.1.1 h1:eTnf7iOoc+90JQWNuN9XVwwpsmtbouYhm9jtlWe9ZY8=
|
||||
github.com/prashantgupta24/mac-sleep-notifier v0.1.1/go.mod h1:+JJNUvuX2hblPUPrecxqDBYjwYdmZYwp82ulj+IYcSU=
|
||||
github.com/robotn/gohook v0.0.0-20190305192954-bbbbefb5ff85/go.mod h1:YD5RyCnUEY2xqtkkgeQVZ31UAfAnVPwUxpTE5cwSXg4=
|
||||
github.com/robotn/gohook v0.0.0-20190315174547-bc414970f3d6 h1:XTKPqoPYwgasmAWhtpolldqBpnbpgH6iAtQPReXiywA=
|
||||
github.com/robotn/gohook v0.0.0-20190315174547-bc414970f3d6/go.mod h1:YD5RyCnUEY2xqtkkgeQVZ31UAfAnVPwUxpTE5cwSXg4=
|
||||
github.com/robotn/gohook v0.0.0-20190318172628-a7a38946710e h1:hY1nssYFqS2RjC/zw+uqgmIFDGwdFEnXdJQFTP1ss3E=
|
||||
github.com/robotn/gohook v0.0.0-20190318172628-a7a38946710e/go.mod h1:YD5RyCnUEY2xqtkkgeQVZ31UAfAnVPwUxpTE5cwSXg4=
|
||||
github.com/shirou/gopsutil v0.0.0-20190131151121-071446942108 h1:XXgDK65TPH+Qbo2sdYHldM5avclwThBXVYZHxroFkTQ=
|
||||
github.com/shirou/gopsutil v0.0.0-20190131151121-071446942108/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 h1:udFKJ0aHUL60LboW/A+DfgoHVedieIzIXE8uylPue0U=
|
||||
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
|
||||
github.com/sirupsen/logrus v1.4.0 h1:yKenngtzGh+cUSSh6GWbxW2abRqhYUSR/t/6+2QqNvE=
|
||||
github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k=
|
||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
@ -63,10 +77,18 @@ github.com/vcaesar/imgo v0.0.0-20181209162409-13af122cf2fa h1:kOg2u5TN+l2IBl4Q0X
|
||||
github.com/vcaesar/imgo v0.0.0-20181209162409-13af122cf2fa/go.mod h1:D+Ywq+8bsOIg4nUk1lgHtPGxYxknhySi/HfZjG7VN/g=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/image v0.0.0-20181116024801-cd38e8056d9b/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067 h1:KYGJGHOQy8oSi1fDlSpcZF0+juKwk/hEMv5SiwHogR0=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f h1:FO4MZ3N56GnxbqxGKqh+YTzUWQ2sDwtFQEZgLOxh9Jc=
|
||||
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e h1:ZytStCyV048ZqDsWHiYDdoI2Vd4msMcrDECFxS+tL9c=
|
||||
golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190410170021-cc4d4f50624c h1:OUGWoQpM/o3TxM7Fp3CEqRpaYCbg4H1hOVPnZoUtr2U=
|
||||
golang.org/x/sys v0.0.0-20190410170021-cc4d4f50624c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
@ -30,9 +30,12 @@ func (m *MouseMover) Start() {
|
||||
}
|
||||
m.quit = make(chan struct{})
|
||||
|
||||
frequency := 60 //value always in seconds
|
||||
heartbeatInterval := 60 //value always in seconds
|
||||
workerInterval := 15
|
||||
|
||||
activityTracker := &tracker.Instance{
|
||||
Frequency: frequency,
|
||||
HeartbeatInterval: heartbeatInterval,
|
||||
WorkerInterval: workerInterval,
|
||||
//LogLevel: "debug", //if we want verbose logging
|
||||
}
|
||||
|
||||
@ -62,6 +65,14 @@ func (m *MouseMover) Start() {
|
||||
log.Errorf("timeout happened after %vms while trying to move mouse", timeout)
|
||||
}
|
||||
|
||||
} else {
|
||||
//uncomment just for reference
|
||||
// log.Printf("activity detected in the last %v seconds.", int(heartbeatInterval))
|
||||
// log.Printf("Activity type:\n")
|
||||
// for activityType, times := range heartbeat.ActivityMap {
|
||||
// log.Printf("activityType : %v times: %v\n", activityType, len(times))
|
||||
// }
|
||||
// log.Printf("\n\n\n")
|
||||
}
|
||||
case <-m.quit:
|
||||
log.Infof("stopping mouse mover")
|
||||
|
Loading…
Reference in New Issue
Block a user