diff --git a/sample_profiles/fx_breathing_red b/sample_profiles/fx_breathing_red new file mode 100644 index 0000000..1b0be0b --- /dev/null +++ b/sample_profiles/fx_breathing_red @@ -0,0 +1,2 @@ + +fx-breathing ff0000 10 # Set breathing effect with red color and speed 10 diff --git a/sample_profiles/fx_color_green b/sample_profiles/fx_color_green new file mode 100644 index 0000000..05f8232 --- /dev/null +++ b/sample_profiles/fx_color_green @@ -0,0 +1,3 @@ +# Green Profile + +fx-color 00ff00 # Set all keys green diff --git a/sample_profiles/fx_colorcycle b/sample_profiles/fx_colorcycle new file mode 100644 index 0000000..1d98ff6 --- /dev/null +++ b/sample_profiles/fx_colorcycle @@ -0,0 +1,2 @@ + +fx-cycle 10 # Set color cycle effect with speed 10 diff --git a/sample_profiles/fx_cwave b/sample_profiles/fx_cwave new file mode 100644 index 0000000..3405986 --- /dev/null +++ b/sample_profiles/fx_cwave @@ -0,0 +1,2 @@ + +fx-cwave 10 # Set center wave effect with speed 10 diff --git a/sample_profiles/fx_hwave b/sample_profiles/fx_hwave new file mode 100644 index 0000000..5eb537c --- /dev/null +++ b/sample_profiles/fx_hwave @@ -0,0 +1,2 @@ + +fx-hwave 10 # Set horizontal wave effect with speed 10 diff --git a/sample_profiles/fx_vwave b/sample_profiles/fx_vwave new file mode 100644 index 0000000..30ea410 --- /dev/null +++ b/sample_profiles/fx_vwave @@ -0,0 +1,2 @@ + +fx-vwave 10 # Set vertical wave effect with speed 10 diff --git a/src/main.cpp b/src/main.cpp index 39e51aa..241659e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -340,6 +340,7 @@ int loadProfile(string profileFile) { Keyboard::KeyAddress keyAddress; Keyboard::KeyValue keyValue; Keyboard::KeyColors colors; + uint8_t speedValue; map var; vector keys; @@ -396,6 +397,106 @@ int loadProfile(string profileFile) { lg_kbd.setKeys(&keys[0], keys.size()); keys.clear(); lg_kbd.commit(); + } else if (line.substr(0,8) == "fx-color") { + line = line.substr(9); + if (line.substr(0, 1) == "$") { + ind = line.find(" "); + line = var[line.substr(1, ind - 1)]; + } else line = line.substr(0, 6); + if (lg_kbd.parseColor(line, colors) == true) { + keys.clear(); + lg_kbd.setGroupKeys(Keyboard::KeyGroup::indicators, colors); + lg_kbd.commit(); + lg_kbd.detach(); + lg_kbd.attach(); + lg_kbd.setFXColor(colors); + } else cout<<"Error on line "<