Skip to content

Instantly share code, notes, and snippets.

@drashna
drashna / oled_pet.c
Last active December 3, 2024 06:05
basic implementation of luna/etc with defer exec
// Images credit j-inc(/James Incandenza) and pixelbenny.
// Credit to obosob for initial animation approach.
// heavily modified by drashna because he's a glutton for punishment
#define OLED_ANIM_SIZE (32+1)
#define OLED_ANIM_ROWS 4
#define OLED_ANIM_MAX_FRAMES 3
#define OLED_SLEEP_FRAMES 2
@drashna
drashna / oled_font.h
Created August 9, 2024 00:34
Oled font with all glyphs
#pragma once
// additional fonts from
// https://github.com/datacute/TinyOLED-Fonts
#include "progmem.h"
// clang-format off
static const unsigned char font[] PROGMEM = {
0x07, 0x08, 0x7F, 0x08, 0x07, 0x00,
#include QMK_KEYBOARD_H
#ifdef OLED_ENABLE
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_2x4(
KC_1, KC_2, KC_3, KC_4,
KC_5, KC_6, KC_7, KC_8
)
};
@drashna
drashna / keymap.c
Created July 15, 2024 23:05
os configed replacements
uint16_t keycode_config(uint16_t keycode) {
switch (keycode) {
case KC_CAPS_LOCK:
case KC_LOCKING_CAPS_LOCK:
if (keymap_config.swap_control_capslock || keymap_config.capslock_to_control) {
return KC_LEFT_CTRL;
} else if (keymap_config.swap_escape_capslock) {
return KC_ESCAPE;
}
return keycode;
@drashna
drashna / config.h
Last active October 30, 2024 15:23
Caps word state sync
#pragma once
#define SPLIT_TRANSACTION_IDS_USER USER_SYNC_A
@drashna
drashna / keymap.c
Created January 9, 2024 01:46
Custom Key log buffer sync
#pragma once
#define OLED_KEYLOGGER_LENGTH 5
#define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_OLED_KEYLOG_STR
@drashna
drashna / python.log
Created September 29, 2023 06:18
userspace python log
❯ qmk userspace-doctor ░▒▓ 11.00   40%   6.35G   11G 
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/logging/__init__.py", line 1113, in emit
stream.write(msg + self.terminator)
^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'write'
Call stack:
File "/usr/local/bin/qmk", line 8, in <module>
sys.exit(main())
@drashna
drashna / changelog.md
Created July 20, 2023 07:57
changelog-test

Core:

  • Send a dummy keycode to neutralize flashing modifiers in retro tap and key overrides (#20992)
  • Adds a way to separate tab from AUTO_SHIFT_SPECIAL. (#20996)
  • [Enhancement] More info on apply_autocorrect (#21056)
  • Remove quantum/keymap.h (#21086)
  • Unicodemap keycodes rename (#21092)
  • Merge upstream uf2conv.py changes (#21107)
  • Add a dynamic_macro_stop_recording(void) function. (#21108)
  • platfoms: chibios: wait: only define the frequency (#21115)
@drashna
drashna / via.json
Last active January 13, 2023 04:58
{
"menus": [
{
"label": "Layer",
"content": [
{
"label": "Layer",
"content": [
{
"label": "Layer",
@drashna
drashna / config.h
Last active November 5, 2023 03:31
custom oled sync and timeout for asymmetical oled config
#define SPLIT_POINTING_ENABLE
#define POINTING_DEVICE_RIGHT
#undef SPLIT_OLED_ENABLE
#define OLED_TIMEOUT 0
#define SPLIT_ACTIVITY_ENABLE