All Projects → timolins → Hyperlayout

timolins / Hyperlayout

Licence: mit
📐 Layout presets for Hyper.app

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Hyperlayout

Awesome Hyper
🖥 Delightful Hyper plugins, themes, and resources
Stars: ✭ 9,687 (+5164.67%)
Mutual labels:  hyper
Weld
Full fake REST API generator written with Rust
Stars: ✭ 146 (-20.65%)
Mutual labels:  hyper
Hyper Pane
Extension for Hyper.app to enhance pane navigation.
Stars: ✭ 160 (-13.04%)
Mutual labels:  hyper
Hyper
🎨 Omni for Hyper
Stars: ✭ 108 (-41.3%)
Mutual labels:  hyper
Hyper Chesterish
Chesterish Theme for Hyper
Stars: ✭ 135 (-26.63%)
Mutual labels:  hyper
Terminal Icons
Beautiful icons for your favourite terminal apps like Hyper and iTerm2
Stars: ✭ 149 (-19.02%)
Mutual labels:  hyper
Nord Hyper
An arctic, north-bluish clean and elegant Hyper theme plugin.
Stars: ✭ 96 (-47.83%)
Mutual labels:  hyper
Hyper Tabs Enhanced
Enhanced Tabs Plugin for Hyper
Stars: ✭ 173 (-5.98%)
Mutual labels:  hyper
Hyperstart
The tiny Init service for HyperContainer
Stars: ✭ 135 (-26.63%)
Mutual labels:  hyper
Hyper Hypest
A beautiful and minimal macOS theme for Hyper
Stars: ✭ 159 (-13.59%)
Mutual labels:  hyper
Php Rpm
PHP Rust Process Manager
Stars: ✭ 113 (-38.59%)
Mutual labels:  hyper
Hyper Tls
Stars: ✭ 131 (-28.8%)
Mutual labels:  hyper
Zsh Theme
Yet another zsh theme
Stars: ✭ 153 (-16.85%)
Mutual labels:  hyper
Hyper
A terminal built on web technologies
Stars: ✭ 37,504 (+20282.61%)
Mutual labels:  hyper
Dotfiles Win
🙈 oh-my-zsh on bash on windows configuration files
Stars: ✭ 167 (-9.24%)
Mutual labels:  hyper
Hyperhue
🌈 A fun HyperTerm theme that responds to your Philips Hue lights
Stars: ✭ 97 (-47.28%)
Mutual labels:  hyper
Hyper Search
Search-text plugin for Hyper.js
Stars: ✭ 146 (-20.65%)
Mutual labels:  hyper
Hyperborder
adds a gradient border to the Hyper terminal
Stars: ✭ 183 (-0.54%)
Mutual labels:  hyper
Routerify
A lightweight, idiomatic, composable and modular router implementation with middleware support for the Rust HTTP library hyper.rs
Stars: ✭ 173 (-5.98%)
Mutual labels:  hyper
Aura Theme
💅 A beautiful dark theme for your favorite apps.
Stars: ✭ 159 (-13.59%)
Mutual labels:  hyper

Layout presets for Hyper.app

Build Status XO code style

This repo is currently unmaintained.

Feel free to contact me if you want to help maintain. Pull requests are welcome!

Install

$ npm install -g hyperlayout hpm-cli
$ hpm install hyperlayout

Usage

To get started, write your layout inside .hyperlayout.

If you already use a package.json file, you can add it there. (With with the hyperlayout key)

Alternatively you can define global layouts in ~/.hyperlayout.

.hyperlayout

[
  [
    "echo 'Hello'",
    "echo 'World'"
  ]
]

To apply the layout, simply run hyperlayout in the same directory.

$ hyperlayout

Result

Demo 1

Advanced example

This example shows the capabilities of hyperlayout. It demonstrates the usage inside package.json and how to define multiple layouts.

package.json

{
  "name": "my-example",
  "scripts": {
    "watch": "gulp watch",
    "serve": "nodemon build/index",
    "layout": "hyperlayout"
  },
  "hyperlayout": {
      "default": [
        [[
          "npm run watch",
          ["npm run serve", "http://localhost:3000"]
        ]],
        "mongod"
      ],
      "helloworld": {
        "entry": "horizontal",
        "layout": [
          "echo 'Hello'",
          "echo 'World'"
        ]
      }
  },
  "devDependencies": {
    "nodemon": "latest",
    "gulp": "latest",
    "hyperlayout": "latest"
  }
}

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

Result

Demo 2

Examples

Tabs

Example 1

["1", "2"]

Horizontal Panes

Example 2

[["1", "2"]]

or

{
  "entry": "horizontal",
  "layout": ["1", "2"]
}

Vertical Panes

Example 3

[[["1", "2"]]]

or

{
  "entry": "vertical",
  "layout": ["1", "2"]
}

Define a layout

There are two different ways to define a layout:

Array

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:

[
  [
    ["echo Hello", "echo World"]
  ]
]

Object

A layout object should contain the following key-value pairs:

  • entry: <String>You can define at which level the layout begins. Either tab, vertical or horizontal. Default value is tab.

  • layout: <Array>A layout, as described above. The only difference is, that it respects the entry point. This can make the layout more readable.

{
  "entry": "vertical",
  "layout": [
    "echo Hello", "echo World"
  ]
}

Multiple Layouts

As shown in the Advanced Example, it's possible to define multiple layouts in one project. Instead of supplying the layout directly, you define name for the layout first.

{
  "default": {
    "entry": "vertical",
    "layout": ["echo Hello", "echo World"]
  },
  "otherlayout": ["echo Hyper", "echo Term"]
}

hyperlayout will look for the default layout, when there is no parameter. If there is one, it will apply the given layout.

$ hyperlayout [NAME]

Global layouts

You can define global layouts inside ~/.hyperlayout.

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]

or

$ hyperlayout g [NAME]

Known Issues

  • 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!

Author

hyperlayout is written by Timo Lins.

Special thanks to Tobias Lins, for coming up with some great solutions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].