Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bin/omarchy-hw-nuphyio-keyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# Detect whether a NuPhy Air75 V3 keyboard is connected.

grep -q "^HID_NAME=NuPhy Air75 V3$" /sys/bus/hid/devices/*/uevent 2>/dev/null
1 change: 1 addition & 0 deletions bin/omarchy-theme-set-keyboard
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

omarchy-theme-set-keyboard-asus-rog
omarchy-theme-set-keyboard-nuphyio
omarchy-theme-set-keyboard-f16
9 changes: 9 additions & 0 deletions bin/omarchy-theme-set-keyboard-nuphyio
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

KEYBOARD_THEME=~/.config/omarchy/current/theme/keyboard.rgb

COLOR=$(sed 's/^#//' $KEYBOARD_THEME)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: quote $KEYBOARD_THEME (and $COLOR on line 8) defensively. Not a practical bug on standard omarchy installs, but consistent with the rest of the codebase and safe against paths containing spaces:

COLOR=$(sed 's/^#//' "$KEYBOARD_THEME")


if omarchy-cmd-present nuphyctl; then
nuphyctl rgb set --hex $COLOR &>/dev/null
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocker: this command fails on any system with more than one HID device. Tested on a real setup and got:

Error: multiple matching HID devices; specify --path or narrow with --iface/--usage-page/--usage

Any machine with a mouse, a webcam, a USB receiver, a DMI controller, etc. will hit this — so effectively most end-user installs. nuphyctl supports --vid and --pid for exactly this case. For the Air75 V3 wired (vid=0x19f5 pid=0x1028):

nuphyctl rgb set --hex "$COLOR" --vid 0x19f5 --pid 0x1028

Two more things on this line:

  1. &>/dev/null hides real errors. The asusctl script lets stderr propagate, which is how bugs get reported. With the current redirect, the theme hook would have been silently broken on almost every system and nobody would know. Consider removing the redirect entirely, or at least keeping stderr (>/dev/null instead of &>/dev/null).
  2. The wireless dongle has a different PID (0x2620). If you want to support both wired and dongle, you'll need to either try both PIDs or have the detection script export which variant is present. Not blocking, but worth a comment in the code about the hardcoded wired PID.

fi
1 change: 1 addition & 0 deletions install/omarchy-other.packages
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ nvidia-dkms
nvidia-open-dkms
nvidia-580xx-utils
nvidia-utils
nuphyctl-bin
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should nuphyctl-bin live here? The existing hardware-specific integrations (asusctl, qmk-hid) are installed exclusively through their gated packaging scripts (install/packaging/asus-rog.sh, install/packaging/framework16.sh) and do not appear in omarchy-other.packages. The companion install/packaging/nuphyio-keyboard.sh in this PR already gates the install on omarchy-hw-nuphyio-keyboard, so this line looks redundant and inconsistent with how the other two keyboard integrations are wired. Is the intent to document the package, or was this an oversight?

lib32-nvidia-580xx-utils
lib32-nvidia-utils
pipewire
Expand Down
1 change: 1 addition & 0 deletions install/packaging/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ run_logged $OMARCHY_INSTALL/packaging/tuis.sh
run_logged $OMARCHY_INSTALL/packaging/npx.sh
run_logged $OMARCHY_INSTALL/packaging/asus-rog.sh
run_logged $OMARCHY_INSTALL/packaging/framework16.sh
run_logged $OMARCHY_INSTALL/packaging/nuphyio-keyboard.sh
run_logged $OMARCHY_INSTALL/packaging/surface.sh
3 changes: 3 additions & 0 deletions install/packaging/nuphyio-keyboard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if omarchy-hw-nuphyio-keyboard; then
omarchy-pkg-aur-add nuphyctl-bin
fi
Comment thread
fldc marked this conversation as resolved.
5 changes: 5 additions & 0 deletions migrations/1774975945.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "Install nuphyctl-bin on systems with a NuPhy keyboard"
Comment thread
fldc marked this conversation as resolved.

if omarchy-hw-nuphyio-keyboard && omarchy-pkg-missing nuphyctl-bin; then
omarchy-pkg-aur-add nuphyctl-bin
fi
Loading