Initial commit
This commit is contained in:
commit
a253de5184
|
@ -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
|
Loading…
Reference in New Issue