Initial commit

This commit is contained in:
Ryan Fox 2022-01-15 18:28:55 -08:00
commit a253de5184
Signed by: flewkey
GPG Key ID: 94F56ADFD848851E
6 changed files with 39 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
dummy-pointer

3
README.txt Normal file
View File

@ -0,0 +1,3 @@
dummy-pointer
Creates a dummy mouse pointer with uinput.

20
dummy-pointer.go Normal file
View File

@ -0,0 +1,20 @@
package main
import (
"os"
"os/signal"
"syscall"
"github.com/bendahl/uinput"
)
func main() {
mouse, err := uinput.CreateMouse("/dev/uinput", []byte("dummy-pointer"))
if err != nil {
os.Exit(1)
}
sc := make(chan os.Signal, 1)
signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM)
<-sc
mouse.Close()
os.Exit(0)
}

8
dummy-pointer.service Normal file
View File

@ -0,0 +1,8 @@
[Unit]
Description=Enable the dummy pointer
[Service]
ExecStart=/usr/local/bin/dummy-pointer
[Install]
WantedBy=multi-user.target

5
go.mod Normal file
View File

@ -0,0 +1,5 @@
module dummy-pointer
go 1.17
require github.com/bendahl/uinput v1.5.0

2
go.sum Normal file
View File

@ -0,0 +1,2 @@
github.com/bendahl/uinput v1.5.0 h1:W+QLck2vvOQeo8McsZzPgFJZEg8KP4IIYOB3mbVvTWY=
github.com/bendahl/uinput v1.5.0/go.mod h1:Np7w3DINc9wB83p12fTAM3DPPhFnAKP0WTXRqCQJ6Z8=