Skip to content
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

indicator-underglow: allow omissions; allow right-hand battery indicators. #29

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

seansfkelley
Copy link

Hi! I'm not sure what your policy is around accepting PRs, but I put together this change for myself and thought I would at least publicize it a bit in case someone wanted similar behavior. With it, I am able to drop the layer indicator underglow (which I don't want) and put the right-hand battery indicator underglow on the right-hand side itself.

This commit does two things:

  1. Provides default values for all indicator-underglow properties, which allows you to omit them entirely if you do not want that indicator.
  2. Allows the right side to specify battery indicators.

I changed the phrasing of the battery left/right properties to be self/other instead.

For (2), note that this currently does not work with the default Glove80 definition for the magic (indicator) key, since the right side does not received the macro-wrapped &rgb_ug RGB_STATUS keypress. See the usptream issue zmkfirmware#1494 for more. (I resolved this for my own build by incorporating the changes from zmkfirmware#1630.)

chrisandreae and others added 10 commits February 10, 2024 13:38
Adds Glove80's status indicator using RGB underglow support. Requires ZMK
PR#999 and PR#1243.

The underglow status is able to show layer state, battery levels,
caps/num/scroll-lock, BLE and USB state. The underglow positions selected for
each of these indicators is configured using the new devicetree node
zmk,underglow-indicators, which takes an array of integer LED positions for each
feature.
Disable underglow when battery below 10%, halve brightness when battery below 20%
Adds a Kconfig setting for the default EXT_POWER status at initialization time. Previously it was always initialized to on if no saved value was present.
Provides an entry point that builds and returns a combined LH + RH keyboard
firmware when provided a keymap via a POST body.

Wraps compilation with ccache, and includes a pre-warmed cache of the build in /tmp/ccache.
To maximize chance of a direct cache hit, changes the lambda driver to always build in /tmp/build.

some back of the envelope measurements (2012 xeon e3-1230v2, nixos)
clean build, no cache -> 21.308
clean build, cache -> 7.145
modified keymap, clean build, cache -> 12.127
Additionally adds a board definition for Glove80-v0, an early version of Glove80.
…tors.

This commit does two things:

1. Provides default values for all indicator-underglow properties, which
   allows you to omit them entirely if you do not want that indicator.
2. Allows the right side to specify battery indicators.

I changed the phrasing of the battery left/right properties to be
self/other instead.

For (2), note that this currently does not work with the default Glove80
definition for the magic (indicator) key, since the right side does not
received the macro-wrapped `&rgb_ug RGB_STATUS` keypress. See the
usptream issue zmkfirmware#1494 for more.
(I resolved this for my own build by incorporating the changes from
zmkfirmware#1630.)
9 14 20 26 32 38
15 21 27 33 39
2 1 0
5 4 3
Copy link
Author

Choose a reason for hiding this comment

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

I'm pretty sure this is right, but I didn't exhaustively check it.


underglow_indicators: underglow-indicators {
compatible = "zmk,underglow-indicators";
// Default: no indicators. Only `bat-self` is supported at the moment.
Copy link
Author

Choose a reason for hiding this comment

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

Thought I'd stub this out for discoverability. Per the PR description, this is actually kind of a trap, because it doesn't work with the default definition of the magic key without pulling in an upstream bugfix.

capslock:
type: int
required: true
default: -1
Copy link
Author

Choose a reason for hiding this comment

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

Not sure what the right way to define "nothing" was here, since I don't think these are nullable. 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants