Skip to content

RSG-Group/hyper-background

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hyper-background

🌌 Change the background of your hyper terminal!

js-standard-style

Tip: Make hyper-background the first plugin in your plugins list for optimal performance (it won't disrupt the speed of other plugins due to its performant and small size).

Technically the first plugin and the whole and sole easy way to do this 😝 Fun fact: We boilerplated and wrote hyper-background in 2 hours. And it worked the first time.

NOTE: This plugin is small, which might cause it to seem unmaintained. If you see the plugin seem so, I assure you that this plugin is actively maintained and if you wish to propose a new feature, report an issue or you are submitting a PR, don't hesitate to do so. If you face issues, read the FAQ.

Supports Windows, macOS and Linux. If you have any issues, report them at the repository's issue tracker.

Installation

Using hyper's CLI

Run the following command in your Hyper terminal:

hyper i hyper-background

Manually

Edit .hyper.js and add "hyper-background" to the plugins array (located near the end of your file), preferably at the start of the array, but after any theme plugins.

Using hpm-cli

If you have hpm-cli installed, run

hpm install hyper-background

FAQ

How should I specify the path?

Either you can provide an absolute path such as /path/to/image.png or a relative path from your home directory which hyper-background will resolve automatically.

Does this support Hyper 2 and newer versions?

Yep. If you're still on Hyper 1.x or older for some reason (???), use version 1.5.1 of this plugin.

Example of a customized terminal

Screenshot_from_2017-08-07_13-50-38.png

Usage

In your .hyper.js file, which probably looks something like this at this point (note that Hyper v4+ will use JSON files for configuration instead of JS):

module.exports = {
  config: {
    // font config
    fontSize: 14,
    fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
    // cursor config
    cursorColor: '#EBCB8B',
    cursorShape: 'BLOCK',
    cursorBlink: true,
    // color config
    foregroundColor: '#fff',
    backgroundColor: '#000',
    borderColor: '#333',
    // hyper-background can handle any value of the CSS key, whether populated manually or populated by a plugin, and will not overwrite it.
    css: '',
    termCSS: '',
    // window and color config
    showHamburgerMenu: true,
    showWindowControls: '',
    padding: '12px 14px',
    colors: {
      ...
    },
    // shell config
    shell: '/bin/bash',
    shellArgs: ['--login'],
    env: {},
    // behaviour config
    bell: false,
    copyOnSelect: false,
  },
  plugins: [
    "hyper-background"
  ]
};

You will need to add the path to your selected background in the config object as backgroundImage after which your .hyper.js should look like:

module.exports = {
  config: {
    // font config
    fontSize: 14,
    fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
    // cursor config
    cursorColor: '#EBCB8B',
    cursorShape: 'BLOCK',
    cursorBlink: true,
    // color config
    foregroundColor: '#fff',
    backgroundColor: '#000',
    borderColor: '#333',
    // css config
    css: '',
    termCSS: '',
    // window and color config
    showHamburgerMenu: true,
    showWindowControls: '',
    padding: '12px 14px',
    colors: {
      ...
    },
    // shell config
    shell: '/bin/zsh',
    shellArgs: ['--login'],
    env: {},
    // behaviour config
    bell: false,
    copyOnSelect: false,

    // Here lies our background image.
    backgroundImage: "/path/to/your/image"
  },
  plugins: [
    "hyper-background"
  ]
};

After this, you should have your background image ready to go!

Development

The recommended Node version required in development is Node 18+ at the time of writing. This is likely out of date when you read this, so use the latest version of Node.js available. The plugin itself works on versions as old as Node.js 6, but this is irrelevant.

  • Run tests via yarn test
  • You can bundle the plugin via yarn build