Skip to content

devoidfury/qmk_modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

QMK community modules for reusable functionality, split out from my own layout.

Installation

Import the repo as a submodule into your qmk_userspace

cd /path/to/your/external/userspace
git submodule add https://github.com/devoidfury/qmk_modules.git modules/devoidfury
git submodule update --init --recursive

Modules

layer_colors

Layer mask indicator lights showing active layer keys above base layer(s), custom colors per layer. The active RGB matrix effect plays undisturbed on the base layer and on transparent keys. No-op keys are dark when active.

Requires per-key-RGB hardware and RGB_MATRIX_ENABLE

keymap.json

{
    "modules": [
        "devoidfury/layer_colors"
    ]
}

Configuration in config.h:

/** turns on our layer lighting effect */
#define LAYER_INDICATOR_RGB_ENABLE

/** (optional) darken transparent keys on indicator lights instead of showing the active animation. */
// #define LAYER_INDICATOR_TRANS_DARK

To specify your own custom configuration for the layer colors, in your keymap.c, define get_color_for_layer.

Example implementation:

// Layers above this one trigger the activity indicators
#define TOP_BASE_LAYER LAYER_BASE

/**
layer activity indicators color configuration.
Each layer above TOP_BASE_LAYER needs an entry here.
For colors, see qmk_firmware/quantum/color.h
*/
static const hsv_t LAYER_INDICATOR_COLORS[] = {
    [LAYER_LOWER] = {HSV_BLUE},
    [LAYER_RAISE] = {HSV_GREEN},
    [LAYER_POINTER] = {HSV_PURPLE},
    [LAYER_DANGER] = {HSV_RED},
};

hsv_t get_color_for_layer(uint8_t layer) {
    return LAYER_INDICATOR_COLORS[layer];
}

version_git

Adds some defines for useful info about your QMK version, including the repo url, the userspace repo url, userspace commit, branches for both.

keymap.json

{
    "modules": [
        "devoidfury/version_git"
    ]
}

Now you can add the include wherever you want to access these defines, for example:

#include "version.h"
#include "version_git.h"

void leader_end_user(void) {
    if (leader_sequence_one_key(KC_V)) {
        // leader, v - qmk-firmware version info
        SEND_STRING(
            "QMK " QMK_REMOTE_URL ">" QMK_BRANCH "@" QMK_COMMIT "\n"
            USERSPACE_REMOTE_URL ">" USERSPACE_BRANCH "@" USERSPACE_COMMIT "\n"
            "Compiled " QMK_BUILDDATE
        );
    }
}

About

devoidfury's QMK community modules.

Topics

Resources

Stars

Watchers

Forks

Contributors