mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-27 02:27:13 +08:00
trackpoint accel script
This commit is contained in:
parent
80d08d67eb
commit
5914b1aefb
1 changed files with 11 additions and 2 deletions
|
|
@ -1,5 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
fixTrackpointAccelCli =
|
||||
"${pkgs.xorg.xinput} --set-prop 'TPPS/2 Elan TrackPoint' 'libinput Accel Speed' 0.7";
|
||||
in
|
||||
{
|
||||
# NOTE: libinput changes require a reboot
|
||||
services.xserver.libinput = {
|
||||
|
|
@ -17,17 +21,22 @@
|
|||
hardware.trackpoint = {
|
||||
enable = true;
|
||||
device = "TPPS/2 Elan TrackPoint"; # Check with `xinput`
|
||||
# FIXME: This doesn't have any effect. Wheras `xinput set-prop` (on CLI) does.
|
||||
# FIXME: This doesn't have any effect. Whereas `xinput set-prop` (on CLI) does. See fixTrackpointAccelCli
|
||||
#sensitivity = 240;
|
||||
#speed = 250;
|
||||
};
|
||||
|
||||
# Automating the aforementioned `xinput set-prop` ...
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
${pkgs.xorg.xinput} --set-prop 'TPPS/2 Elan TrackPoint' 'libinput Accel Speed' 0.8
|
||||
${fixTrackpointAccelCli}
|
||||
'';
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
libinput # libinput CLI
|
||||
(pkgs.writeScriptBin "fix-trackpoint-accel"
|
||||
''
|
||||
#!${pkgs.runtimeShell}
|
||||
${fixTrackpointAccelCli}
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue