Add Framework 16 RGB keyboard theme syncing (#4524)

* Add framwork 16 RGB syncing

* fixed install script, fixed color changing when style changes

* added framework scripts to the main install scripts

* renamed theme-set scripts, added migration

* use omarchy-pkg-add, shared keyboard template, tracked udev rule

* call the install file from the migration file
This commit is contained in:
Steve Godlewski
2026-02-18 21:19:30 +01:00
committed by GitHub
parent 5f978a9ea9
commit 43ae186a80
12 changed files with 53 additions and 2 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
FRAMEWORK16_THEME=~/.config/omarchy/current/theme/keyboard.rgb
if omarchy-cmd-present qmk_hid && [[ -f "$FRAMEWORK16_THEME" ]]; then
hex=$(cat "$FRAMEWORK16_THEME")
hex="${hex#\#}"
# Convert hex to QMK HSV (0-255 scale) using Python's colorsys
read -r h s <<< $(python3 -c "
import colorsys
r, g, b = int('$hex'[:2],16)/255, int('$hex'[2:4],16)/255, int('$hex'[4:6],16)/255
h, s, v = colorsys.rgb_to_hsv(r, g, b)
print(int(h * 255), int(s * 255))
")
qmk_hid via --rgb-effect 1 2>/dev/null
qmk_hid via --rgb-hue "$h" 2>/dev/null
qmk_hid via --rgb-saturation "$s" 2>/dev/null
qmk_hid via --rgb-brightness 100 2>/dev/null
qmk_hid via --save 2>/dev/null
fi