Skip to content

Feature Request: Framework 13 Automatic fingerprint sensor switching #1433

Open
@JustinLex

Description

@JustinLex

Hi, I use the following snippet to enable and disable my fingerprint sensor when docking my Framework 13. Could this be added as an option to the Framework 13 module?

  services.acpid = {
    enable = true;
    lidEventCommands =
      let goodixVendor = "27c6";
      in ''
        grep -q closed /proc/acpi/button/lid/LID0/state
        if [ $? = 0 ]; then
          ${pkgs.fd}/bin/fd "-" /sys/bus/usb/devices --exec /bin/sh -c '${pkgs.gnugrep}/bin/grep -qs ${goodixVendor} {}/idVendor && ${pkgs.coreutils}/bin/echo 0 > {}/authorized'
        else
          ${pkgs.fd}/bin/fd "-" /sys/bus/usb/devices --exec /bin/sh -c '${pkgs.gnugrep}/bin/grep -qs ${goodixVendor} {}/idVendor && ${pkgs.coreutils}/bin/echo 1 > {}/authorized'
        fi
      '';
  };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions