Initial commit
This commit is contained in:
commit
a253de5184
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
dummy-pointer
|
3
README.txt
Normal file
3
README.txt
Normal file
@ -0,0 +1,3 @@
|
||||
dummy-pointer
|
||||
|
||||
Creates a dummy mouse pointer with uinput.
|
20
dummy-pointer.go
Normal file
20
dummy-pointer.go
Normal 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
8
dummy-pointer.service
Normal 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
5
go.mod
Normal file
@ -0,0 +1,5 @@
|
||||
module dummy-pointer
|
||||
|
||||
go 1.17
|
||||
|
||||
require github.com/bendahl/uinput v1.5.0
|
Loading…
x
Reference in New Issue
Block a user