Remove the LayerBasedTheme plugin
It’s buggy and actually much more useless than i thought.
This commit is contained in:
parent
1303f78d6f
commit
48ceca0dd2
@ -1,32 +0,0 @@
|
||||
#include "LayerBasedTheme.h"
|
||||
|
||||
#include "kaleidoscope/layers.h"
|
||||
#include "kaleidoscope/plugin/LEDControl.h"
|
||||
|
||||
namespace kaleidoscope {
|
||||
namespace plugin {
|
||||
EventHandlerResult LayerBasedTheme::onLayerChange() {
|
||||
uint8_t current_layer = Layer.mostRecent();
|
||||
uint8_t current_mode = ::LEDControl.get_mode_index();
|
||||
uint8_t new_mode;
|
||||
|
||||
if (current_layer <= 3) {
|
||||
new_mode = 2;
|
||||
} else {
|
||||
new_mode = 3;
|
||||
}
|
||||
|
||||
if (new_mode != current_mode) {
|
||||
::LEDControl.set_mode(new_mode);
|
||||
}
|
||||
|
||||
return EventHandlerResult::OK;
|
||||
}
|
||||
|
||||
LayerBasedTheme::TransientLEDMode::TransientLEDMode(
|
||||
const LayerBasedTheme *parent)
|
||||
: parent_(parent){};
|
||||
} // namespace plugin
|
||||
} // namespace kaleidoscope
|
||||
|
||||
kaleidoscope::plugin::LayerBasedTheme LayerBasedTheme;
|
@ -1,30 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "kaleidoscope/event_handler_result.h"
|
||||
#include "kaleidoscope/plugin.h"
|
||||
#include "kaleidoscope/plugin/AccessTransientLEDMode.h"
|
||||
#include "kaleidoscope/plugin/LEDMode.h"
|
||||
#include "kaleidoscope/plugin/LEDModeInterface.h"
|
||||
|
||||
namespace kaleidoscope {
|
||||
namespace plugin {
|
||||
class LayerBasedTheme : public Plugin,
|
||||
public LEDModeInterface,
|
||||
public AccessTransientLEDMode {
|
||||
public:
|
||||
LayerBasedTheme(void) {}
|
||||
|
||||
EventHandlerResult onLayerChange();
|
||||
|
||||
class TransientLEDMode : public LEDMode {
|
||||
public:
|
||||
explicit TransientLEDMode(const LayerBasedTheme *parent);
|
||||
|
||||
private:
|
||||
const LayerBasedTheme *parent_;
|
||||
};
|
||||
};
|
||||
} // namespace plugin
|
||||
} // namespace kaleidoscope
|
||||
|
||||
extern kaleidoscope::plugin::LayerBasedTheme LayerBasedTheme;
|
@ -37,8 +37,6 @@
|
||||
|
||||
#include "Kaleidoscope-USB-Quirks.h"
|
||||
|
||||
#include "LayerBasedTheme.h"
|
||||
|
||||
enum {
|
||||
MACRO_VERSION_INFO,
|
||||
MACRO_ANY,
|
||||
@ -311,8 +309,7 @@ KALEIDOSCOPE_INIT_PLUGINS(
|
||||
MouseKeys,
|
||||
HostPowerManagement,
|
||||
MagicCombo,
|
||||
USBQuirks,
|
||||
LayerBasedTheme
|
||||
USBQuirks
|
||||
);
|
||||
|
||||
void setup() {
|
||||
|
Loading…
Reference in New Issue
Block a user