Skip to content

Commit

Permalink
clang format pass
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna committed Mar 31, 2020
1 parent 5a697d0 commit 46f7cdb
Show file tree
Hide file tree
Showing 7 changed files with 150 additions and 156 deletions.
157 changes: 78 additions & 79 deletions users/drashna/oled_stuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,86 +7,85 @@ void oled_driver_render_logo(void);
bool process_record_user_oled(uint16_t keycode, keyrecord_t *record);

#ifdef OLED_DISPLAY_128X64
#define OLED_RENDER_KEYLOGGER "Keylogger: "

#define OLED_RENDER_LAYOUT_NAME "Layout: "
#define OLED_RENDER_LAYOUT_QWERTY "Qwerty"
#define OLED_RENDER_LAYOUT_COLEMAK "Colemak"
#define OLED_RENDER_LAYOUT_DVORAK "Dvorak"
#define OLED_RENDER_LAYOUT_WORKMAN "Workman"
#define OLED_RENDER_LAYOUT_NORMAN "Norman"
#define OLED_RENDER_LAYOUT_MALTRON "Matron"
#define OLED_RENDER_LAYOUT_EUCALYN "Eucalyn"
#define OLED_RENDER_LAYOUT_CARPLAX "Carplax"

#define OLED_RENDER_LAYER_NAME "Layer:\n"
#define OLED_RENDER_LAYER_LOWER " Lower"
#define OLED_RENDER_LAYER_RAISE " Raise"
#define OLED_RENDER_LAYER_ADJUST " Adjust"
#define OLED_RENDER_LAYER_MODS " Mods"

#define OLED_RENDER_LOCK_NAME "Lock: "
#define OLED_RENDER_LOCK_NUML "NUML"
#define OLED_RENDER_LOCK_CAPS "CAPS"
#define OLED_RENDER_LOCK_SCLK "SCLK"

#define OLED_RENDER_MODS_NAME "Mods: "
#define OLED_RENDER_MODS_SFT "Sft"
#define OLED_RENDER_MODS_CTL "Ctl"
#define OLED_RENDER_MODS_ALT "Alt"
#define OLED_RENDER_MODS_GUI "GUI"

#define OLED_RENDER_BOOTMAGIC_NAME "Boot "
#define OLED_RENDER_BOOTMAGIC_NKRO "NKRO"
#define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI"
#define OLED_RENDER_BOOTMAGIC_GRV "GRV"
#define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"

#define OLED_RENDER_USER_NAME "USER:"
#define OLED_RENDER_USER_ANIM "Anim"
#define OLED_RENDER_USER_LAYR "Layr"
#define OLED_RENDER_USER_NUKE "Nuke"
# define OLED_RENDER_KEYLOGGER "Keylogger: "

# define OLED_RENDER_LAYOUT_NAME "Layout: "
# define OLED_RENDER_LAYOUT_QWERTY "Qwerty"
# define OLED_RENDER_LAYOUT_COLEMAK "Colemak"
# define OLED_RENDER_LAYOUT_DVORAK "Dvorak"
# define OLED_RENDER_LAYOUT_WORKMAN "Workman"
# define OLED_RENDER_LAYOUT_NORMAN "Norman"
# define OLED_RENDER_LAYOUT_MALTRON "Matron"
# define OLED_RENDER_LAYOUT_EUCALYN "Eucalyn"
# define OLED_RENDER_LAYOUT_CARPLAX "Carplax"

# define OLED_RENDER_LAYER_NAME "Layer:\n"
# define OLED_RENDER_LAYER_LOWER " Lower"
# define OLED_RENDER_LAYER_RAISE " Raise"
# define OLED_RENDER_LAYER_ADJUST " Adjust"
# define OLED_RENDER_LAYER_MODS " Mods"

# define OLED_RENDER_LOCK_NAME "Lock: "
# define OLED_RENDER_LOCK_NUML "NUML"
# define OLED_RENDER_LOCK_CAPS "CAPS"
# define OLED_RENDER_LOCK_SCLK "SCLK"

# define OLED_RENDER_MODS_NAME "Mods: "
# define OLED_RENDER_MODS_SFT "Sft"
# define OLED_RENDER_MODS_CTL "Ctl"
# define OLED_RENDER_MODS_ALT "Alt"
# define OLED_RENDER_MODS_GUI "GUI"

# define OLED_RENDER_BOOTMAGIC_NAME "Boot "
# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO"
# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI"
# define OLED_RENDER_BOOTMAGIC_GRV "GRV"
# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"

# define OLED_RENDER_USER_NAME "USER:"
# define OLED_RENDER_USER_ANIM "Anim"
# define OLED_RENDER_USER_LAYR "Layr"
# define OLED_RENDER_USER_NUKE "Nuke"

#else
#define OLED_RENDER_KEYLOGGER "KLogr"

#define OLED_RENDER_LAYOUT_NAME "Lyout"
#define OLED_RENDER_LAYOUT_QWERTY " QRTY"
#define OLED_RENDER_LAYOUT_COLEMAK " COLE"
#define OLED_RENDER_LAYOUT_DVORAK " DVRK"
#define OLED_RENDER_LAYOUT_WORKMAN " WKMN"
#define OLED_RENDER_LAYOUT_NORMAN " NORM"
#define OLED_RENDER_LAYOUT_MALTRON " MLTN"
#define OLED_RENDER_LAYOUT_EUCALYN " ECLN"
#define OLED_RENDER_LAYOUT_CARPLAX " CRPX"

#define OLED_RENDER_LAYER_NAME "LAYER"
#define OLED_RENDER_LAYER_LOWER "Lower"
#define OLED_RENDER_LAYER_RAISE "Raise"
#define OLED_RENDER_LAYER_ADJUST "Adjst"
#define OLED_RENDER_LAYER_MODS " Mods"

#define OLED_RENDER_LOCK_NAME "Lock:"
#define OLED_RENDER_LOCK_NUML "N"
#define OLED_RENDER_LOCK_CAPS "C"
#define OLED_RENDER_LOCK_SCLK "S"

#define OLED_RENDER_MODS_NAME "Mods: "
#define OLED_RENDER_MODS_SFT "S"
#define OLED_RENDER_MODS_CTL "C"
#define OLED_RENDER_MODS_ALT "A"
#define OLED_RENDER_MODS_GUI "G"

#define OLED_RENDER_BOOTMAGIC_NAME "BTMGK"
#define OLED_RENDER_BOOTMAGIC_NKRO "NKRO"
#define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI"
#define OLED_RENDER_BOOTMAGIC_GRV "GRV"
#define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"

#define OLED_RENDER_USER_NAME "USER:"
#define OLED_RENDER_USER_ANIM "Anim"
#define OLED_RENDER_USER_LAYR "Layr"
#define OLED_RENDER_USER_NUKE "Nuke"

# define OLED_RENDER_KEYLOGGER "KLogr"

# define OLED_RENDER_LAYOUT_NAME "Lyout"
# define OLED_RENDER_LAYOUT_QWERTY " QRTY"
# define OLED_RENDER_LAYOUT_COLEMAK " COLE"
# define OLED_RENDER_LAYOUT_DVORAK " DVRK"
# define OLED_RENDER_LAYOUT_WORKMAN " WKMN"
# define OLED_RENDER_LAYOUT_NORMAN " NORM"
# define OLED_RENDER_LAYOUT_MALTRON " MLTN"
# define OLED_RENDER_LAYOUT_EUCALYN " ECLN"
# define OLED_RENDER_LAYOUT_CARPLAX " CRPX"

# define OLED_RENDER_LAYER_NAME "LAYER"
# define OLED_RENDER_LAYER_LOWER "Lower"
# define OLED_RENDER_LAYER_RAISE "Raise"
# define OLED_RENDER_LAYER_ADJUST "Adjst"
# define OLED_RENDER_LAYER_MODS " Mods"

# define OLED_RENDER_LOCK_NAME "Lock:"
# define OLED_RENDER_LOCK_NUML "N"
# define OLED_RENDER_LOCK_CAPS "C"
# define OLED_RENDER_LOCK_SCLK "S"

# define OLED_RENDER_MODS_NAME "Mods: "
# define OLED_RENDER_MODS_SFT "S"
# define OLED_RENDER_MODS_CTL "C"
# define OLED_RENDER_MODS_ALT "A"
# define OLED_RENDER_MODS_GUI "G"

# define OLED_RENDER_BOOTMAGIC_NAME "BTMGK"
# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO"
# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI"
# define OLED_RENDER_BOOTMAGIC_GRV "GRV"
# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"

# define OLED_RENDER_USER_NAME "USER:"
# define OLED_RENDER_USER_ANIM "Anim"
# define OLED_RENDER_USER_LAYR "Layr"
# define OLED_RENDER_USER_NUKE "Nuke"

#endif
5 changes: 2 additions & 3 deletions users/drashna/process_records.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif // KEYLOGGER_ENABLE
#ifdef OLED_DRIVER_ENABLE
process_record_user_oled(keycode, record);
#endif // OLED
#endif // OLED

if (process_record_keymap(keycode, record)
&& process_record_secrets(keycode, record)
if (process_record_keymap(keycode, record) && process_record_secrets(keycode, record)
#ifdef RGB_MATRIX_ENABLE
&& process_record_user_rgb_matrix(keycode, record)
#endif
Expand Down
18 changes: 9 additions & 9 deletions users/drashna/process_records.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,27 @@ enum userspace_custom_keycodes {
bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);

#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define ADJUST MO(_ADJUST)
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define ADJUST MO(_ADJUST)
#define TG_MODS TG(_MODS)
#define TG_GAME TG(_GAMEPAD)
#define OS_LWR OSL(_LOWER)
#define OS_RSE OSL(_RAISE)
#define OS_LWR OSL(_LOWER)
#define OS_RSE OSL(_RAISE)

#define KC_SEC1 KC_SECRET_1
#define KC_SEC2 KC_SECRET_2
#define KC_SEC3 KC_SECRET_3
#define KC_SEC4 KC_SECRET_4
#define KC_SEC5 KC_SECRET_5

#define QWERTY KC_QWERTY
#define DVORAK KC_DVORAK
#define QWERTY KC_QWERTY
#define DVORAK KC_DVORAK
#define COLEMAK KC_COLEMAK
#define WORKMAN KC_WORKMAN

#define KC_RESET RESET
#define KC_RST KC_RESET
#define KC_RST KC_RESET

#ifdef SWAP_HANDS_ENABLE
# define KC_C1R3 SH_T(KC_TAB)
Expand All @@ -81,7 +81,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
#define OS_RCTL OSM(MOD_RCTL)
#define OS_LALT OSM(MOD_LALT)
#define OS_RALT OSM(MOD_RALT)
#define OS_MEH OSM(MOD_MEH)
#define OS_MEH OSM(MOD_MEH)
#define OS_HYPR OSM(MOD_HYPR)

#define ALT_APP ALT_T(KC_APP)
Expand Down
1 change: 0 additions & 1 deletion users/drashna/rgb_matrix_stuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ bool process_record_user_rgb_matrix(uint16_t keycode, keyrecord_t *record) {
}
#endif
break;

}
return true;
}
6 changes: 3 additions & 3 deletions users/drashna/rgb_matrix_stuff.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once
#include "quantum.h"

bool process_record_user_rgb_matrix(uint16_t keycode, keyrecord_t *record);
void keyboard_post_init_rgb_matrix(void);
void matrix_scan_rgb_matrix(void);
bool process_record_user_rgb_matrix(uint16_t keycode, keyrecord_t *record);
void keyboard_post_init_rgb_matrix(void);
void matrix_scan_rgb_matrix(void);

void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type);
Loading

0 comments on commit 46f7cdb

Please sign in to comment.