A command-line tool to change the GNOME terminal background from Jade templates and JSON data.
Last updated 5 years ago by dp28 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install layer-terminal -g
SYNC missed versions from official npm registry.


A command-line tool to change the GNOME terminal background from Jade templates and JSON data.

Simple example

With the Jade template:

      body {
        background: black;
        color: white;

      h1 {
        float: right;
    h1 Hello, #{test}

and JSON:

  "test": "layer"

renders the output:



Layer makes it possible to programmatically change the terminal background as a way of providing information without disrupting your workflow. For example, it can be used:

  • To notify you that a long-running script has finished (see the provided 'notifications' template)
  • As an in-your-face todo list (see the provided 'todo' template)
  • As a reference for keyboard shortcuts that you do not yet know


Using npm:

npm install -g layer-terminal

If you don't have phantomjs installed, this is also required:

sudo apt-get install phantomjs

To enable tab completion, then do:

layer completion >> ~/.bashrc


layer <command> [options]



Arguments: -t/--template

Stores a named reference to the Jade and JSON files specifed. The created template reference can be set as the default template using the config command.


Arguments: -t/--template --profile, --allow-scroll, --image-file, --column-width, --row-height

Render a template to the terminal background. The exact Jade and JSON files can be specified, as can the location for the background image to be saved.

In addition, some terminal properties can be specifed or set: the GNOME profile whose background to change, whether the image scrolls when the terminal scrolls and the mapping between row/column sizes and pixels (to ensure the image is scaled to fit the terminal correctly).


Arguments: -k /--key, -v/--value, -t/--template

Write some JSON or a string to a particular key within an object in the data for a template, then render that template. For example, with the template data:

    "test": {}

layer write -k test.child -v success updates the template to:

    "test": {
        "child": "success"


Arguments: -k /--key, -v/--value, -t/--template

Similar to write, but appends values rather than replacing them.


Arguments: -k /--key, -t/--template

Print a value from within a template to the console. For example, with the template data:

    "test": [1, 2, 3]

layer read -k test[0] prints 1 to the console.


Arguments: -k /--key, -t/--template

Delete the value of a key within a template's data. If the key is an index into an array, the array is reduced in size.


List the names of all saved templates.


Arguments: -t/--template

Print a template and its data to the console.


Arguments: -t/--template

Deletes a reference to a named Jade template and JSON data file. This does not remove the files themselves.


Arguments: The same as render

Shows the stored default settings for layer, or updates them if a setting name and value are passed.


Prints a bash completion script to enable tab completion of layer commands and options. Append this to ~/.bashrc when layer is installed so that completions are automatically available.



Current Tags

  • 1.1.3                                ...           latest (5 years ago)

11 Versions

  • 1.1.3                                ...           5 years ago
  • 1.1.2                                ...           5 years ago
  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.2.2                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.3                                ...           5 years ago
  • 0.1.2                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (10)
Dev Dependencies (0)
Dependents (1)

Copyright 2014 - 2016 © |