-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Open
godlewski
wants to merge
5
commits into
basecamp:dev
Choose a base branch
from
godlewski:framework16-rgb-support
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+60
−2
Open
Changes from all commits
Commits
Show all changes
5 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 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 |
2 changes: 1 addition & 1 deletion
2
bin/omarchy-theme-set-asusctl → bin/omarchy-theme-set-keyboard-asus-rog
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,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 |
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 @@ | ||
| SUBSYSTEM=="hidraw", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", MODE="0660", TAG+="uaccess" |
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,9 @@ | ||
| # 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 | ||
| sudo cp "$OMARCHY_PATH/default/udev/framework16-qmk-hid.rules" /etc/udev/rules.d/50-framework16-qmk-hid.rules | ||
| 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-add qmk-hid | ||
| 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,11 @@ | ||
| echo "Install Framework 16 keyboard RGB support" | ||
|
|
||
| if omarchy-hw-framework16; then | ||
| omarchy-pkg-add qmk-hid | ||
|
|
||
| if [[ ! -f /etc/udev/rules.d/50-framework16-qmk-hid.rules ]]; then | ||
| sudo cp "$OMARCHY_PATH/default/udev/framework16-qmk-hid.rules" /etc/udev/rules.d/50-framework16-qmk-hid.rules | ||
| 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can call the install file from here so we don't need to duplicate this logic.