Layout presets for Hyper.app
$ npm install -g hyperlayout hpm-cli$ hpm install hyperlayout
To get started, write your layout inside
If you already use a
package.json file, you can add it there. (With with the
Alternatively you can define global layouts in
To apply the layout, simply run
hyperlayout in the same directory.
This example shows the capabilities of
hyperlayout. It demonstrates the usage inside
package.json and how to define multiple layouts.
Since there are two layouts defined here, you have to tell
hyperlayout which one you want to use.
$ hyperlayout # Layout: default
$ hyperlayout helloworld # Layout: helloworld
$ npm run layout # Layout: default
Define a layout
There are two different ways to define a layout:
The most basic way is to create a nested array with strings (commands) inside. The hierarchy looks like this:
Tabs |-- Horizontal Panes |-- Vertical Panes |-- Horizontal Panes |-- Vertical Panes |-- ...
This is a example for a vertical split using this method:
A layout object should contain the following key-value pairs:
entry: <String>– You can define at which level the layout begins. Either
horizontal. Default value is
layout: <Array>– A layout, as described above. The only difference is, that it respects the entry point. This can make the layout more readable.
hyperlayout will look for the
default layout, when there is no parameter. If there is one, it will apply the given layout.
$ hyperlayout [NAME]
You can define global layouts inside
hyperlayout will use these layouts when there is no configuration in the current directory. It's possible to force global layouts with the following command:
$ hyperlayout global [NAME]
$ hyperlayout g [NAME]
- It isn't possible layout multiple windows at once. If you know how to approach this feature, then head over to Issue #2 and let me know!
hyperlayout is written by Timo Lins.
Special thanks to Tobias Lins, for coming up with some great solutions.