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 the layers table. The logic for switching is mostly in the layer_changer function and allows setting the delay as a parameter and is designed to cycle through the layers 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.
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!