Initial commit

master
Ryan Fox 11 months ago
commit a253de5184
Signed by: flewkey
GPG Key ID: 94F56ADFD848851E
  1. 1
      .gitignore
  2. 3
      README.txt
  3. 20
      dummy-pointer.go
  4. 8
      dummy-pointer.service
  5. 5
      go.mod
  6. 2
      go.sum

1
.gitignore vendored

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

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

@ -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)
}

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

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

@ -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=
Loading…
Cancel
Save