mirror of
https://github.com/sezanzeb/input-remapper
synced 2024-11-16 06:12:58 +00:00
systemd optional in postinst
This commit is contained in:
parent
6326c59d03
commit
0f30f5ae78
@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
if [ -d "/run/systemd/system/" ]; then
|
||||
systemctl enable key-mapper
|
||||
systemctl stop key-mapper
|
||||
systemctl start key-mapper
|
||||
fi
|
||||
|
@ -82,7 +82,7 @@ class SystemMapping:
|
||||
|
||||
if USER != 'root':
|
||||
# write this stuff into the key-mapper config directory, because
|
||||
# the systemd service needs to know the xmodmap list on boot.
|
||||
# the systemd service won't know the user sessions xmodmap
|
||||
path = get_config_path(XMODMAP_FILENAME)
|
||||
touch(path)
|
||||
with open(path, 'w') as file:
|
||||
|
@ -91,7 +91,7 @@ an example autoload entry:
|
||||
```
|
||||
|
||||
`preset name` refers to `~/.config/key-mapper/presets/device name/preset name.json`.
|
||||
The device name can be found with `evtest`.
|
||||
The device name can be found with `sudo key-mapper-control --list-devices`.
|
||||
|
||||
Anything that is relevant to presets can be overwritten in them as well.
|
||||
Here is an example configuration for preset "a" for the "gamepad" device:
|
||||
@ -130,7 +130,7 @@ running (or without sudo if your user has the appropriate permissions).
|
||||
|
||||
```bash
|
||||
key-mapper-control --command autoload
|
||||
key-mapper-control --list-devices
|
||||
sudo key-mapper-control --list-devices
|
||||
key-mapper-control --command stop --device "Razer Razer Naga Trinity"
|
||||
key-mapper-control --command start --device "Razer Razer Naga Trinity" --preset "~/.config/key-mapper/presets/gamepad/a.json"
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user