Adding keybow-mini example layout for switching 'layers' on the fly #90
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've added an example layout that allows you to define 'layers' that you can swap to on the fly by double pressing a key. There is a new folder called layers where you can place your layer files that will be required when configuring your layout. At the top of the layout file you can
require
the different layers that you would like to use and then add them to thelayers
table. The logic for switching is mostly in thelayer_changer
function and allows setting the delay as a parameter and is designed to cycle through thelayers
table sequentially and then wrap. There are a few 'global' variables used to keep track of the layer state and time between button presses.I have included two examples of layers, one of which is for programmers that will facilitate coding workflows and the other has some i3 linux shortcuts. The layers are effectively layouts themselves however they are packed into a table and referenced programmatically in the main layout file so the big difference is the normal functions need to be encapsulated.
Feel free to make or request any changes!