Skip to content

Latest commit

 

History

History
87 lines (60 loc) · 2.5 KB

setup.md

File metadata and controls

87 lines (60 loc) · 2.5 KB

Setup

Back to README · Command guide

Arch Linux

Install nuphyctl-bin from the AUR:

yay -S nuphyctl-bin
# or
paru -S nuphyctl-bin

The package installs the binary and udev rule. Arch's standard pacman hook reloads the rules and retriggers devices, including keyboards already plugged in.

Release binaries

Download the archive for your architecture (linux-x86_64 or linux-aarch64) from GitHub Releases, then extract it. From the extracted directory:

sudo install -Dm755 nuphyctl /usr/local/bin/nuphyctl
sudo install -Dm644 70-nuphyctl.rules /etc/udev/rules.d/70-nuphyctl.rules

Then reload the rules.

Build from source

Install Rust/Cargo, a C compiler, pkg-config, and the libudev development files (provided by systemd on Arch or libudev-dev on Debian/Ubuntu).

cargo build --locked
cargo run -- --help

To install the binary locally from the checkout:

cargo install --locked --path .

Source builds and cargo install do not install udev rules. From the checkout:

sudo install -Dm644 udev/70-nuphyctl.rules /etc/udev/rules.d/70-nuphyctl.rules

Then reload the rules.

Linux device permissions

nuphyctl needs read/write access to the keyboard's /dev/hidraw* devices. The bundled rule grants access to the active local seat user through systemd-logind, without running nuphyctl as root or making devices world-writable. It matches NuPhy USB devices (vendor ID 19f5).

Distribution packages should install the rule under /usr/lib/udev/rules.d/; manual installations should use /etc/udev/rules.d/ as shown above. Avoid installing duplicate copies in both locations.

Reload device permissions

After manually installing the rule, or if automatic device retriggering is disabled:

sudo udevadm control --reload-rules
sudo udevadm trigger --subsystem-match=hidraw --property-match=ID_VENDOR_ID=19f5 --action=change
sudo udevadm settle

Alternatively, replug the keyboard once after reloading the rules.

Once installed, the rule also covers keyboards connected before login; no per-login trigger or replug is needed. The filename must sort before 73-seat-late.rules, which applies the access ACL. SSH-only and other sessions without an active local seat are not granted access.

Verify access without sudo:

nuphyctl keymap info