diff options
author | lassulus <lassulus@lassul.us> | 2021-03-17 15:42:13 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2021-03-17 15:42:13 +0100 |
commit | 3d1472a7cac3ab2c5f9efd06a501368308681999 (patch) | |
tree | 950fbe49dfd060923756dd517c41f27f646857de /makefu/1systems/x/x13/input.nix | |
parent | f659c1879f6e0a0e9228205edd794aaab467aa0b (diff) | |
parent | 2044ad632b68ce173463287a9f437aae699bda83 (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/1systems/x/x13/input.nix')
-rw-r--r-- | makefu/1systems/x/x13/input.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/makefu/1systems/x/x13/input.nix b/makefu/1systems/x/x13/input.nix index 68b855d8e..775e19303 100644 --- a/makefu/1systems/x/x13/input.nix +++ b/makefu/1systems/x/x13/input.nix @@ -1,3 +1,4 @@ +{ pkgs, lib, ... }: { # current issues: # 1. for pressing insert hold shift+fn+Fin @@ -9,5 +10,37 @@ xinput set-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5 # configure timeout of pressing and holding middle button # xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 + xinput disable 'ETPS/2 Elantech Touchpad' ''; + boot.kernelParams = [ + #"psmouse.proto=imps" + #"psmouse.proto=bare" + #"psmouse.resetafter=0" + "psmouse.synaptics_intertouch=1" # echo 1 > /sys/devices/platform/i8042/serio1/reg_07 + ]; + + programs.light.enable = true; + services.actkbd = { + enable = true; + bindings = [ + { keys = [ 225 ]; events = [ "key" ]; command = "${pkgs.light}/bin/light -A 10"; } # fn - F5 + { keys = [ 224 ]; events = [ "key" ]; command = "${pkgs.light}/bin/light -U 10"; } # fn - F6 + # fn - 4 => suspend + # fn - d => lcdshadow + { keys = [ 227 ]; events = [ "key" ]; command = builtins.toString ( # fn - F7 + pkgs.writers.writeDash "toggle_touchpad" '' + PATH=${lib.makeBinPath [ pkgs.xorg.xinput pkgs.gnugrep ]} + DISPLAY=:0 + export DISPLAY PATH + + device=$(xinput list --name-only | grep Touchpad) + if [ "$(xinput list-props "$device" | grep -P ".*Device Enabled.*\K.(?=$)" -o)" -eq 1 ];then + xinput disable "$device" + else + xinput enable "$device" + fi + ''); + } + ]; + }; } |