Deamon management
This commit is contained in:
9
data/60-gkeymapper.rules
Normal file
9
data/60-gkeymapper.rules
Normal file
@@ -0,0 +1,9 @@
|
||||
# gKeyMapper - grant the logged-in user access to the keyboard's vendor
|
||||
# interface and to /dev/uinput, so the daemon needs no root.
|
||||
#
|
||||
# Only models the daemon has a device table for are listed (see
|
||||
# daemon/device_tables.cpp); add the idProduct of a new model there first.
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c32b", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c335", TAG+="uaccess"
|
||||
|
||||
KERNEL=="uinput", TAG+="uaccess"
|
||||
24
data/gkeymapper-daemon.service
Normal file
24
data/gkeymapper-daemon.service
Normal file
@@ -0,0 +1,24 @@
|
||||
# gKeyMapper daemon - systemd user unit.
|
||||
#
|
||||
# This file is installed by "make install", which fills in the binary directory
|
||||
# for the configured PREFIX. Enable it per user with:
|
||||
#
|
||||
# systemctl --user daemon-reload
|
||||
# systemctl --user enable --now gkeymapper-daemon
|
||||
#
|
||||
# It runs as a user service on purpose: the daemon needs the user's session for
|
||||
# /dev/uinput and for the DISPLAY/WAYLAND_DISPLAY a "command" action inherits.
|
||||
[Unit]
|
||||
Description=gKeyMapper daemon - G1..G9 remapping for the Logitech G910
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=@BINDIR@/gkeymapper-daemon
|
||||
# Reload the mappings without a restart (the config file is watched as well).
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
TimeoutStopSec=5
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
2
data/gkeymapper-uinput.conf
Normal file
2
data/gkeymapper-uinput.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
# gKeyMapper daemon - the daemon creates a virtual keyboard via /dev/uinput.
|
||||
uinput
|
||||
Reference in New Issue
Block a user