Files
gKeyMapper/data/gkeymapper-daemon.service
2026-10-18 02:57:29 +02:00

30 lines
1.0 KiB
Desktop File

# 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=dbus: the unit counts as started once the daemon owns its bus name, so
# D-Bus activation (data/dev.rager.gkeymapper.Daemon.service) and the GUI see a
# consistent state. A second instance exits instead of fighting over the
# keyboard, which two of them would do.
Type=dbus
BusName=dev.rager.gkeymapper.Daemon
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