all repos — qmk-userspace @ 7ff9d1b94f354066398a5925a91f5fc2d5c7a839

custom layouts for qmk keyboards

restructure as external userspace
la-ninpre aaoth@aaoth.xyz
Wed, 05 Jun 2024 00:12:37 +0300
commit

7ff9d1b94f354066398a5925a91f5fc2d5c7a839

parent

2c4639a23e6f22119f190a08fb44af427b6fad60

A .gitignore

@@ -0,0 +1,1 @@

+*.bin
A Makefile

@@ -0,0 +1,16 @@

+.SILENT: + +MAKEFLAGS += --no-print-directory + +QMK_USERSPACE := $(patsubst %/,%,$(dir $(shell realpath "$(lastword $(MAKEFILE_LIST))"))) +ifeq ($(QMK_USERSPACE),) + QMK_USERSPACE := $(shell pwd) +endif + +QMK_FIRMWARE_ROOT = $(shell qmk config -ro user.qmk_home | cut -d= -f2 | sed -e 's@^None$$@@g') +ifeq ($(QMK_FIRMWARE_ROOT),) + $(error Cannot determine qmk_firmware location. `qmk config -ro user.qmk_home` is not set) +endif + +%: + +$(MAKE) -C $(QMK_FIRMWARE_ROOT) $(MAKECMDGOALS) QMK_USERSPACE=$(QMK_USERSPACE)
M README.mdREADME.md

@@ -1,10 +1,14 @@

-# keychron v1 ansi knobless qmk keymap +# qmk userspace my experiments with qmk. don't wanna go too advanced and exploring the world of customizable keyboards, while trying to figure out what i would think will be convenient for me. -## 2023-01-03 +## keyboards an layouts + +### keychron v1 ansi knobless + +_2024-01-03_ basic qwerty, f-row is used for switching workspaces in window managers (i use sway, hyprland and cwm, all of them are configured to use super+<n>

@@ -19,3 +23,4 @@ second layer contains f-keys and numpad.

third layer contains some magick keys for entering bootloader mode, clearing eeprom and toggling nkro. need to hold space and del to reach it. +
M config.hkeyboards/keychron/v1/ansi/keymaps/lbr/config.h

@@ -20,5 +20,5 @@ /* set our defaults */

#define RGB_MATRIX_DISABLE_KEYCODES #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_DEFAULT_HUE 0 -#define RGB_MATRIX_DEFAULT_SAT 154 -#define RGB_MATRIX_DEFAULT_VAL 127 +#define RGB_MATRIX_DEFAULT_SAT 191 +#define RGB_MATRIX_DEFAULT_VAL 204
M keymap.ckeyboards/keychron/v1/ansi/keymaps/lbr/keymap.c

@@ -7,6 +7,8 @@ * - figure out tap dance, may be useful

* - is nkro needed? * - is spacebar ok to change layers? i thought it is the biggest button, so it'll be easier to use. * - do i really need more than 6 ttys? + * - i don't use the media keys yet, maybe replace them with smth more useful + * - maybe numpad isn't that useful to have it so easily accessible, but some symbols would benefit from that */ // switch to tty on linux, TTY(1) => Ctrl+Alt+F1

@@ -61,19 +63,21 @@

// top-right key for numpad status #define IND_NUMPAD 14 #define IND_CAPSLK 0 -#define IND_COLOUR 0xCC, 0x33, 0x33 +#define IND_COLOUR 0x00, 0xbf, 0xcc bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if(rgb_matrix_is_enabled()){ led_t led_state = host_keyboard_led_state(); + HSV hsv = {IND_COLOUR}; + RGB rgb = hsv_to_rgb(hsv); if(led_state.num_lock){ - rgb_matrix_set_color(IND_NUMPAD, IND_COLOUR); + rgb_matrix_set_color(IND_NUMPAD, rgb.r, rgb.g, rgb.b); }else{ rgb_matrix_set_color(IND_NUMPAD, RGB_BLACK); } if(led_state.caps_lock){ - rgb_matrix_set_color(IND_CAPSLK, IND_COLOUR); + rgb_matrix_set_color(IND_CAPSLK, rgb.r, rgb.g, rgb.b); }else{ rgb_matrix_set_color(IND_CAPSLK, RGB_BLACK); }
A qmk.json

@@ -0,0 +1,4 @@

+{ + "userspace_version": "1.0", + "build_targets": [] +}