Layers seem to be working now
This commit is contained in:
parent
e4833b9980
commit
c88c83562e
3 changed files with 36 additions and 14 deletions
|
@ -31,12 +31,14 @@
|
|||
mkShell,
|
||||
nil,
|
||||
alejandra,
|
||||
udisks2,
|
||||
qmk,
|
||||
}: {
|
||||
qmk = mkShell {
|
||||
buildInputs = [
|
||||
nil
|
||||
alejandra
|
||||
udisks2
|
||||
qmk
|
||||
];
|
||||
# inherit (self.outputs.checks.${system}.pre-commit-check) shellHook;
|
||||
|
|
|
@ -6,4 +6,21 @@ cp ./config.h ~/qmk_firmware/keyboards/keebio/iris_ce/keymaps/lytedev
|
|||
cp ./rules.mk ~/qmk_firmware/keyboards/keebio/iris_ce/keymaps/lytedev
|
||||
cp ./keymap.c ~/qmk_firmware/keyboards/keebio/iris_ce/keymaps/lytedev
|
||||
|
||||
qmk flash --keyboard keebio/iris_ce/rev1 -km lytedev
|
||||
(
|
||||
while true; do
|
||||
echo "Trying to mount RPI-RP2..."
|
||||
if udisksctl mount -b /dev/disk/by-label/RPI-RP2; then
|
||||
exit 0
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
) &
|
||||
|
||||
if qmk flash --keyboard keebio/iris_ce/rev1 -km lytedev; then
|
||||
echo "Flashing complete!"
|
||||
kill %1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
kill %1
|
||||
exit 1
|
||||
|
|
|
@ -79,31 +79,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
switch (get_highest_layer(state)) {
|
||||
case LG:
|
||||
rgblight_mode(1);
|
||||
rgblight_sethsv(HSV_RED);
|
||||
break;
|
||||
case LRG:
|
||||
rgblight_mode(1);
|
||||
rgblight_sethsv(HSV_YELLOW);
|
||||
break;
|
||||
switch (get_highest_layer(state | default_layer_state)) {
|
||||
case LL:
|
||||
rgblight_mode(1);
|
||||
rgblight_mode_noeeprom(1);
|
||||
rgblight_sethsv(HSV_BLUE);
|
||||
break;
|
||||
case LR:
|
||||
rgblight_mode(1);
|
||||
rgblight_mode_noeeprom(1);
|
||||
rgblight_sethsv(HSV_GREEN);
|
||||
break;
|
||||
case LA:
|
||||
rgblight_mode(1);
|
||||
rgblight_mode_noeeprom(1);
|
||||
rgblight_sethsv(HSV_PURPLE);
|
||||
break;
|
||||
case LC:
|
||||
rgblight_mode(1);
|
||||
rgblight_mode_noeeprom(1);
|
||||
rgblight_sethsv(HSV_ORANGE);
|
||||
break;
|
||||
default:
|
||||
if (IS_LAYER_ON_STATE(state | default_layer_state, LG)) {
|
||||
rgblight_mode_noeeprom(1);
|
||||
rgblight_sethsv(HSV_RED);
|
||||
} else if (IS_LAYER_ON_STATE(state | default_layer_state, LRG)) {
|
||||
rgblight_mode_noeeprom(1);
|
||||
rgblight_sethsv(HSV_YELLOW);
|
||||
} else {
|
||||
rgblight_mode_noeeprom(RGB_MATRIX_DEFAULT_MODE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue