-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add Framework 16 RGB keyboard theme syncing #4524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f4385ef
Add framwork 16 RGB syncing
godlewski 3d2bc60
fixed install script, fixed color changing when style changes
godlewski 85e3225
added framework scripts to the main install scripts
godlewski 295751e
renamed theme-set scripts, added migration
godlewski 43c09c3
use omarchy-pkg-add, shared keyboard template, tracked udev rule
godlewski e24a5d4
call the install file from the migration file
godlewski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Detect whether the computer is a Framework Laptop 16. | ||
|
|
||
| [[ "$(cat /sys/class/dmi/id/sys_vendor 2>/dev/null)" == "Framework" ]] && | ||
| grep -q "Laptop 16" /sys/class/dmi/id/product_name 2>/dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/bash | ||
|
|
||
| omarchy-theme-set-keyboard-asus-rog | ||
| omarchy-theme-set-keyboard-f16 |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #!/bin/bash | ||
|
|
||
| FRAMEWORK16_THEME=~/.config/omarchy/current/theme/framework16-kbd.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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {{ accent }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Allow unprivileged access to the Framework 16 keyboard for RGB control via qmk_hid. | ||
|
|
||
| if omarchy-hw-framework16; then | ||
| if [[ ! -f /etc/udev/rules.d/50-framework16-qmk-hid.rules ]]; then | ||
| cat <<EOF | sudo tee /etc/udev/rules.d/50-framework16-qmk-hid.rules | ||
| SUBSYSTEM=="hidraw", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", MODE="0660", TAG+="uaccess" | ||
godlewski marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| EOF | ||
|
|
||
| sudo udevadm control --reload-rules | ||
| sudo udevadm trigger | ||
| fi | ||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| if omarchy-hw-framework16; then | ||
| omarchy-pkg-aur-add qmk-hid | ||
godlewski marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| echo "Install Framework 16 keyboard RGB support" | ||
|
|
||
| if omarchy-hw-framework16; then | ||
| omarchy-pkg-aur-add qmk-hid | ||
godlewski marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| if [[ ! -f /etc/udev/rules.d/50-framework16-qmk-hid.rules ]]; then | ||
godlewski marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| cat <<EOF | sudo tee /etc/udev/rules.d/50-framework16-qmk-hid.rules | ||
| SUBSYSTEM=="hidraw", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", MODE="0660", TAG+="uaccess" | ||
| EOF | ||
|
|
||
| sudo udevadm control --reload-rules | ||
| sudo udevadm trigger | ||
| fi | ||
| fi | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.